QueryCache
new QueryCache(player, options)
Parameter | Type | Optional | Description |
---|---|---|---|
player | Player | ❌ | - |
options | QueryCacheOptions | ❌ | - |
Properties
private #defaultCache: Map<string, DiscordPlayerQueryResultCache<Track>>
public options: QueryCacheOptions
public player: Player
public timer: Timer
public checkInterval: number
Methods
public addData(data): Promise<void>
Parameter | Type | Optional | Description |
---|---|---|---|
data | SearchResult | ❌ | - |
public cleanup(): Promise<void>
public clear(): Promise<void>
public getData(): Promise<Array<DiscordPlayerQueryResultCache<Track>>>
public resolve(context): Promise<SearchResult>
Parameter | Type | Optional | Description |
---|---|---|---|
context | QueryCacheResolverContext | ❌ | - |