- Provides Redis-compatible API for caching operations without external Redis dependency
- Implements TTL-based expiration with automatic cleanup mechanisms
- Supports common Redis commands (GET, SET, SETEX, DEL, INCR, EXISTS, EXPIRE)
- Manages concurrent access through async-safe data structures
- Maintains API compatibility with existing Redis client code
- Redis API Emulation: Drop-in replacement for Redis client with identical command interface
- Memory Management: In-process cache with automatic expiration and cleanup
- Concurrency Safety: Thread-safe operations using Arc/Mutex patterns
- TTL Management: Automatic expiration handling with background cleanup tasks
- Command Translation: Redis command parsing and execution against in-memory storage
- Development Simplification: Eliminates Redis server dependency for development/testing
ConnectionManager: Redis connection manager compatible interface
InMemoryCache: Core in-memory storage with TTL support
Command: Redis command builder with argument chaining
FromCacheResponse: Type conversion trait for Redis response adaptation
ToArg: Type conversion trait for command arguments
- Background cleanup task with automatic expired entry removal
- Command Construction: Redis-style command building with typed arguments
- Argument Serialization: Convert typed arguments to string representations
- Command Execution: Parse and execute Redis commands against in-memory store
- TTL Processing: Handle expiration times and automatic cleanup
- Response Adaptation: Convert internal results to expected Redis response types
- Background Cleanup: Periodic removal of expired cache entries
- Application State: Integrated into shared application state for dependency injection
- Handler Layer: Used by all handlers requiring caching functionality
- Monitoring Systems: Cache hit/miss metrics and performance tracking
- Authentication: Token blacklisting and session management
- Rate Limiting: Request counting and window management
- Session Storage: Temporary session data and state management
- Drop-in Replacement: API-compatible Redis client replacement pattern
- Background Processing: Autonomous cleanup task for memory management
- Type-Safe Commands: Strongly-typed command arguments and responses
- Concurrent Data Structures: Thread-safe access patterns for shared cache
- TTL Management: Lazy and proactive expiration handling
- Memory Efficiency: Automatic cleanup prevents unbounded memory growth