Get a value from cache
Cache key
Cached value or null if not found
Set a value in cache
Cache key
Value to cache
Optionalttl: number
Time to live in seconds (optional)
True if successful
Delete a key from cache
Cache key
True if key was deleted
Check if a key exists in cache
Cache key
True if key exists
Invalidate all keys matching a pattern
Key pattern (supports glob patterns like user:*)
Number of keys invalidated
Clear all cache entries (use with caution)
True if successful
Get multiple keys at once
Array of cache keys
Array of values (null for missing keys)
Set multiple keys at once
Array of {key, value, ttl?} objects
True if successful
Close the cache backend connection
Promise that resolves when connection is closed
Check if cache backend is connected
True if connected
Abstract interface for cache backend implementations