@stacksjs/cache 0.75.539 → 0.75.542
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/drivers/index.d.ts +0 -34
- package/package.json +2 -2
package/dist/drivers/index.d.ts
CHANGED
|
@@ -196,40 +196,6 @@ export declare class TaggedCache {
|
|
|
196
196
|
flush(): Promise<number>;
|
|
197
197
|
private doFlushOne;
|
|
198
198
|
}
|
|
199
|
-
/**
|
|
200
|
-
* Default cache instance: the driver `config/cache.ts` selects.
|
|
201
|
-
*
|
|
202
|
-
* It used to be the memory instance whatever the config said, so an app that
|
|
203
|
-
* chose `driver: 'redis'` - or `'sqlite'`, to keep entries across deploys -
|
|
204
|
-
* still lost every entry on a restart and kept one cache per worker. Resolved
|
|
205
|
-
* on first use, so importing the package opens no connection. A plain object
|
|
206
|
-
* with a method per operation, so it can be spied on like any other.
|
|
207
|
-
*/
|
|
208
|
-
declare class ConfiguredCache implements CacheDriver {
|
|
209
|
-
get<T>(key: string): Promise<T | undefined>;
|
|
210
|
-
mget<T>(keys: string[]): Promise<Record<string, T>>;
|
|
211
|
-
set<T>(key: string, value: T, ttl?: number): Promise<boolean>;
|
|
212
|
-
mset<T>(entries: Array<{ key: string, value: T, ttl?: number }>): Promise<boolean>;
|
|
213
|
-
setForever<T>(key: string, value: T): Promise<boolean>;
|
|
214
|
-
getOrSet<T>(key: string, fetcher: () => T | Promise<T>, ttl?: number): Promise<T>;
|
|
215
|
-
del(keys: string | string[]): Promise<number>;
|
|
216
|
-
has(key: string): Promise<boolean>;
|
|
217
|
-
missing(key: string): Promise<boolean>;
|
|
218
|
-
remove(key: string): Promise<void>;
|
|
219
|
-
deleteMany(keys: string[]): Promise<number>;
|
|
220
|
-
clear(): Promise<void>;
|
|
221
|
-
flush(): Promise<void>;
|
|
222
|
-
keys(pattern?: string): Promise<string[]>;
|
|
223
|
-
getTtl(key: string): Promise<number | undefined>;
|
|
224
|
-
ttl(key: string, ttl: number): Promise<boolean>;
|
|
225
|
-
take<T>(key: string): Promise<T | undefined>;
|
|
226
|
-
remember<T>(key: string, ttl: number, callback: () => T | Promise<T>): Promise<T>;
|
|
227
|
-
rememberForever<T>(key: string, callback: () => T | Promise<T>): Promise<T>;
|
|
228
|
-
getStats(): Promise<CacheStats>;
|
|
229
|
-
close(): Promise<void>;
|
|
230
|
-
disconnect(): Promise<void>;
|
|
231
|
-
tags(tags: readonly string[]): TaggedCache;
|
|
232
|
-
}
|
|
233
199
|
export { SingleStoreCacheStore } from './singlestore';
|
|
234
200
|
export { SqliteCacheStore } from './sqlite';
|
|
235
201
|
// Re-export ts-cache utilities for advanced usage
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/cache",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.75.
|
|
4
|
+
"version": "0.75.542",
|
|
5
5
|
"description": "Caching the Stacks way.",
|
|
6
6
|
"author": "Chris Breuer",
|
|
7
7
|
"contributors": [
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"prepublishOnly": "bun run build"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@stacksjs/config": "0.75.
|
|
62
|
+
"@stacksjs/config": "0.75.542",
|
|
63
63
|
"@stacksjs/ts-cache": "^0.1.9"
|
|
64
64
|
}
|
|
65
65
|
}
|