init app resources

This commit is contained in:
dswbx
2025-06-14 16:59:03 +02:00
parent 3338804c34
commit b87696a0db
13 changed files with 659 additions and 1 deletions

32
app/src/core/drivers/cache/index.ts vendored Normal file
View File

@@ -0,0 +1,32 @@
/**
* Interface for cache driver implementations
* Defines standard methods for interacting with a cache storage system
*/
export interface ICacheDriver {
/**
* Retrieves a value from the cache by its key
*
* @param key unique identifier for the cached value
* @returns resolves to the cached string value or undefined if not found
*/
get(key: string): Promise<string | undefined>;
/**
* Stores a value in the cache with an optional time-to-live
*
* @param key unique identifier for storing the value
* @param value string value to cache
* @param ttl optional time-to-live in seconds before the value expires
* @throws if the value cannot be stored
*/
set(key: string, value: string, ttl?: number): Promise<void>;
/**
* Removes a value from the cache
*
* @param key unique identifier of the value to delete
*/
del(key: string): Promise<void>;
}
export { cacheDriverTestSuite } from "./cache-driver-test-suite";