Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
16 lines
1.3 KiB
Plaintext
16 lines
1.3 KiB
Plaintext
import type { CommandArgs as IORedisCommandArgs } from '@opentelemetry/instrumentation-ioredis';
|
|
export declare const GET_COMMANDS: string[];
|
|
export declare const SET_COMMANDS: string[];
|
|
/** Checks if a given command is in the list of redis commands.
|
|
* Useful because commands can come in lowercase or uppercase (depending on the library). */
|
|
export declare function isInCommands(redisCommands: string[], command: string): boolean;
|
|
/** Determine cache operation based on redis statement */
|
|
export declare function getCacheOperation(command: string): 'cache.get' | 'cache.put' | 'cache.remove' | 'cache.flush' | undefined;
|
|
/** Safely converts a redis key to a string (comma-separated if there are multiple keys) */
|
|
export declare function getCacheKeySafely(redisCommand: string, cmdArgs: IORedisCommandArgs): string[] | undefined;
|
|
/** Determines whether a redis operation should be considered as "cache operation" by checking if a key is prefixed.
|
|
* We only support certain commands (such as 'set', 'get', 'mget'). */
|
|
export declare function shouldConsiderForCache(redisCommand: string, keys: string[], prefixes: string[]): boolean;
|
|
/** Calculates size based on the cache response value */
|
|
export declare function calculateCacheItemSize(response: unknown): number | undefined;
|
|
//# sourceMappingURL=redisCache.d.ts.map |