Comparing version 1.6.0 to 1.6.1
@@ -55,2 +55,7 @@ import { KeyvStoreAdapter, StoredData, Keyv } from 'keyv'; | ||
}; | ||
type CacheableItem$1 = { | ||
key: string; | ||
value: any; | ||
expires?: number; | ||
}; | ||
declare class CacheableMemory { | ||
@@ -85,2 +90,3 @@ private readonly _hashCache; | ||
get keys(): IterableIterator<string>; | ||
get items(): IterableIterator<CacheableItem$1>; | ||
get<T>(key: string): any; | ||
@@ -87,0 +93,0 @@ set(key: string, value: any, ttl?: number): void; |
@@ -148,2 +148,5 @@ // src/index.ts | ||
} | ||
get items() { | ||
return this.concatStores().values(); | ||
} | ||
get(key) { | ||
@@ -150,0 +153,0 @@ const store = this.getStore(key); |
{ | ||
"name": "cacheable", | ||
"version": "1.6.0", | ||
"version": "1.6.1", | ||
"description": "Simple Caching Engine using Keyv", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -215,2 +215,3 @@ [<img align="center" src="https://cacheable.org/logo.svg" alt="Cacheable" />](https://github.com/jaredwray/cacheable) | ||
* `keys()`: The keys in the cache. | ||
* `items()`: The items in the cache as `{ key, value, expiration }`. | ||
* `checkExpired()`: Checks for expired keys in the cache. This is used by the `checkInterval` property. | ||
@@ -217,0 +218,0 @@ * `startIntervalCheck()`: Starts the interval check for expired keys if `checkInterval` is above 0 ms. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
70511
1990
226