Skip to content

Commit

Permalink
Use WeakMapAdapter by default
Browse files Browse the repository at this point in the history
  • Loading branch information
shimizudev committed Nov 15, 2024
1 parent 325f022 commit debfef5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/services/base-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { LilyTrack, type LilyTrack as Track } from '../models/track';
import { version } from '../utils';
import type { LilyNodeManager as NodeManager } from './node-manager';
import type { LilyPlayerManager as PlayerManager } from './player-manager';
import { type CacheAdapter, MapAdapter } from '../cache';
import { type CacheAdapter, WeakMapAdapter } from '../cache';

enum TrackEndReason {
QueueEnd = 'queueEnd',
Expand Down Expand Up @@ -211,7 +211,7 @@ export class LilyManager extends EventEmitter {
...config.options,
});

this.cache = this.options.cache?.adapter ?? new MapAdapter(this.options.cache?.options);
this.cache = this.options.cache?.adapter ?? new WeakMapAdapter(this.options.cache?.options);
this.bindCacheEvents();
const NodeManagerClass = Registry.get('NodeManager');
this.nodes = new NodeManagerClass(this, [...config.nodes]);
Expand Down

0 comments on commit debfef5

Please sign in to comment.