import { CacheProvider , CacheStorageKey } from '@discordoo/providers' ; export async function cacheProviderClearPolyfill < P extends CacheProvider = CacheProvider > ( provider , keyspace , storage ) { const keys = [ ] ; await provider . forEach ( keyspace , storage , ( v , k ) => { keys . push ( k ) ; } ) ; if ( keys . length ) { return provider . delete ( keyspace , storage , keys ) ; } return true ; }