@mondaydotcomorg/atp-runtime
Version:
Runtime SDK injected into sandbox for Agent Tool Protocol
32 lines • 887 B
TypeScript
export type { CacheConfig, CacheBackend } from './types';
export { MemoryCacheBackend, RedisCacheBackend, initializeCache } from './backends.js';
/**
* Cache Runtime API
*
* Store and retrieve data with optional TTL (Time To Live).
* Supports in-memory (node-cache) and Redis backends.
*/
declare class CacheAPI {
/**
* Gets a value from cache
*/
get<T>(key: string): Promise<T | null>;
/**
* Sets a value in cache with optional TTL in seconds
*/
set(key: string, value: unknown, ttl?: number): Promise<void>;
/**
* Deletes a value from cache
*/
delete(key: string): Promise<void>;
/**
* Checks if a key exists in cache
*/
has(key: string): Promise<boolean>;
/**
* Clears all cache entries
*/
clear(): Promise<void>;
}
export declare const cache: CacheAPI;
//# sourceMappingURL=index.d.ts.map