import { IdmpGlobalKey, IdmpOptions, IdmpPromise } from 'idmp'; declare const cachePrefix: string; /** * Build a redis key from (namespace, globalKey). * * Each part is `encodeURIComponent`-encoded individually, then joined with * `:` (colon). encodeURIComponent leaves `_` untouched — so the previous * `${namespace}_${globalKey}` join was ambiguous: * ('user', '_admin_x') * ('user_', 'admin_x') * both produced `user__admin_x` and would clobber each other. * * encodeURIComponent escapes `:` to `%3A`, so a literal `:` is the unique * separator regardless of what the user puts in either part. */ declare const getCachePath: (namespace: string, globalKey: string) => string; interface RedisIdmpOptions { url: string; } type IdmpLike = ((globalKey: IdmpGlobalKey, promiseFunc: IdmpPromise, options?: IdmpOptions) => Promise) & { flush: (globalKey: IdmpGlobalKey) => void; flushAll: () => void; }; declare const redisIdmpWrap: (_idmp: IdmpLike, namespace: string, options: RedisIdmpOptions) => { (globalKey: string, promiseFunc: IdmpPromise, options?: IdmpOptions): Promise; flush(globalKey: string): Promise; flushAll(): Promise; quit(): Promise; }; export default redisIdmpWrap; export { cachePrefix, getCachePath };