CompTIA Cloud+ (CV0-004)TroubleshootingMedium
A cloud administrator has deployed a new application that uses a managed caching service (e.g., Redis, Memcached). After deployment, users report that the application frequently shows stale data, even after updates are made in the backend database. The caching service metrics show high cache hit ratios. What is the MOST likely cause of the stale data?
- AInsufficient memory allocated to the caching service instances.
- BThe caching service instances are experiencing high network latency.
- CThe application is not properly invalidating or expiring cached data after database updates.
- DThe database is not configured for proper replication to the caching service.
Show answer & explanationAnswer & explanation
Correct answer: C. The application is not properly invalidating or expiring cached data after database updates.
High cache hit ratios indicate the cache is working and serving data, but if that data is stale, the application is likely not instructing the cache to invalidate or refresh entries when the underlying database data changes.
Why the other options are wrong
- A. Insufficient memory would lead to cache evictions and lower hit ratios, not high hit ratios with stale data.
- B. High network latency would lead to slow responses, not necessarily stale data being served.
- D. Caching services typically don't 'replicate' directly from a database; they are populated by the application. The application is responsible for cache coherence.
Cache Invalidation
The process of removing or updating stale data from a cache to ensure that users always receive the most current information.
- Crucial for maintaining data consistency.
- Can be explicit (application-driven) or time-based (TTL).
- Poor invalidation leads to stale data issues.
Memory trick: Invalidate Cache, Keep Data Fresh.