Skip to content

Commit

Permalink
🩹 compatible with lru-cache v7 (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
kuitos authored Oct 5, 2022
1 parent 6ee7b27 commit 80d7eb3
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,22 @@
* @since 2017-09-28
*/

import Cache from 'lru-cache';
import LRUCache from 'lru-cache';
import cacheAdapterEnhancer from './cacheAdapterEnhancer';
import retryAdapterEnhancer from './retryAdapterEnhancer';
import throttleAdapterEnhancer from './throttleAdapterEnhancer';
import { ICacheLike } from './utils/getDefaultLruCache';

class Cache<K, V> extends LRUCache<K, V> {
constructor(options: LRUCache.Options<any, any>) {
super(options);
}

del(key: K): boolean {
return super.delete(key);
}
}

export {
Cache,
ICacheLike,
Expand Down

0 comments on commit 80d7eb3

Please sign in to comment.