You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apply Redis Cluster hash tags in RedisStore for all keys
This implements a comprehensive solution for Redis Cluster compatibility
by applying hash tags to all cache keys at the RedisStore level.
Implementation:
- Added applyHashTag() method to RedisStore
- Special handling for flexible() cache keys to ensure related keys
(value, created, lock) hash to the same slot
- Applied to all RedisStore methods: get, many, put, putMany, add,
increment, decrement, forever, lock, forget
Key format:
- Regular keys: {hash(key)}:key
- Flexible created keys: {hash(originalKey)}:illuminate:cache:flexible:created:originalKey
- Flexible lock keys: {hash(originalKey)}:illuminate:cache:flexible:lock:originalKey
This ensures that Cache::flexible() works correctly on Redis Cluster
including AWS ElastiCache Serverless (Valkey) while maintaining
backward compatibility with non-cluster Redis.
Reverted Repository.php and tests to original state as hash tags are
now handled transparently at the RedisStore level.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
0 commit comments