Steadybit logoReliability Hub
GitHubGitHub iconStart Free Trial
Steadybit logoReliability Hub

Force Cache Expiration

AttackAttack
New
Sets TTL on string keys matching a pattern to force them to expire. Non-string keys are skipped.
Targets:
Redis Databases
Install now

Force Cache Expiration

Sets TTL on string keys matching a pattern to force them to expire. Non-string keys are skipped.
AttackAttack
Install now

Force Cache Expiration

AttackAttack
New
Sets TTL on string keys matching a pattern to force them to expire. Non-string keys are skipped.
Install now

Force Cache Expiration

Sets TTL on string keys matching a pattern to force them to expire. Non-string keys are skipped.
AttackAttack
Install now
Go back to list

Introduction

Sets a short TTL on string keys matching a pattern in a Redis database to force them to expire, simulating sudden cache invalidation. Non-string keys (hashes, lists, sets, etc.) are skipped. When the attack ends, expired keys can optionally be restored with their original values and TTLs.

This action targets Redis databases (not instances). For instance-level memory pressure, use Limit MaxMemory instead. For connection-level faults, use Exhaust Connections.

Use Cases

  • Simulate sudden cache invalidation to test cache rebuild performance and thundering-herd resilience.
  • Verify session expiration handling by expiring session keys and observing application behavior.
  • Test that the application gracefully handles cache misses without degraded user experience.

Parameters

ParameterDescriptionDefault
DurationHow long the attack should last.60s
PatternKey pattern to match (e.g., session:*, cache:*). Uses Redis SCAN glob-style matching. Only string keys are affected; non-string keys are skipped.steadybit-test:*
TTLTime-to-live to set on matched keys. Keys expire after this duration.5s
Max KeysMaximum number of keys to affect. Set to 0 for unlimited. Use this to limit blast radius in production.100
Restore On StopRestore expired keys with their original values and TTLs when the attack ends. Strongly recommended to prevent data loss.true
Start Using Steadybit Today

Get started with Steadybit, and you’ll get access to all of our features to discover the full power of Steadybit. Available for SaaS and on-prem!

Are you unsure where to begin?

No worries, our reliability experts are here to help: book a demo with them!

Statistics
-Stars
Tags
Redis
Data Store
Cache
Homepage
hub.steadybit.com/extension/com.steadybit.extension_redis
License
MIT
MaintainerSteadybit
Install now
Steadybit logoReliability Hub
Start Free Trial
© 2026 Steadybit GmbH. All rights reserved.
Twitter iconLinkedIn iconGitHub icon