import { CacheProvider } from '../../interfaces/cache-provider'; import { TieredCacheOptions } from '../../interfaces/cache-options'; /** * Handles write operations for tiered cache */ export declare class TieredCacheWriteStrategy { private providers; private options; private logger; /** * Creates a new TieredCacheWriteStrategy * @param providers Array of cache providers * @param options Cache options * @param logger Logger instance */ constructor(providers: Array<{ provider: CacheProvider; options: { writeOnHitFromLowerTier: boolean; ttl?: number; }; }>, options: TieredCacheOptions, logger: any); /** * Set a value in the cache * @param key Cache key * @param value Value to cache * @param ttl Time-to-live in milliseconds (optional) * @returns Promise resolving to true if successful */ set(key: string, value: T, ttl?: number): Promise; /** * Write value to the first tier (L1) * @param key Cache key * @param value Value to cache * @param ttl Time-to-live in milliseconds * @returns Promise resolving to true if successful */ private writeToFirstTier; /** * Write value to all tiers * @param key Cache key * @param value Value to cache * @param ttl Time-to-live in milliseconds * @returns Promise resolving to true if at least one write was successful */ private writeToAllTiers; /** * Write value to lower tiers (L2+) * @param key Cache key * @param value Value to cache * @param ttl Time-to-live in milliseconds * @returns Promise resolving to true if at least one write was successful */ private writeToLowerTiers; /** * Write value to lower tiers asynchronously (fire and forget) * @param key Cache key * @param value Value to cache * @param ttl Time-to-live in milliseconds */ private writeToLowerTiersAsync; /** * Set multiple values in the cache * @param entries Map of key-value pairs to cache * @param ttl Time-to-live in milliseconds (optional) * @returns Promise resolving to true if successful */ setMany(entries: Map, ttl?: number): Promise; /** * Write multiple values to the first tier (L1) * @param entries Map of key-value pairs to cache * @param ttl Time-to-live in milliseconds * @returns Promise resolving to true if successful */ private writeToFirstTierMany; /** * Write multiple values to all tiers * @param entries Map of key-value pairs to cache * @param ttl Time-to-live in milliseconds * @returns Promise resolving to true if at least one write was successful */ private writeToAllTiersMany; /** * Write multiple values to lower tiers (L2+) * @param entries Map of key-value pairs to cache * @param ttl Time-to-live in milliseconds * @returns Promise resolving to true if at least one write was successful */ private writeToLowerTiersMany; /** * Write multiple values to lower tiers asynchronously (fire and forget) * @param entries Map of key-value pairs to cache * @param ttl Time-to-live in milliseconds */ private writeToLowerTiersManyAsync; /** * Increment a numeric value in the cache * @param key Cache key * @param increment Amount to increment (default: 1) * @returns Promise resolving to the new value */ increment(key: string, increment?: number): Promise; } //# sourceMappingURL=write-strategy.d.ts.map