A web application reads the same expensive query result thousands of times per minute. Slightly stale results are acceptable for 30 seconds. Which optimization best reduces database load?

Published
  1. Use a cache-aside strategy with bounded TTLs and an explicit invalidation approach.
  2. Cache results permanently with no invalidation or expiration.
  3. Run the expensive query separately for every client and disable all caching.
  4. Use sticky sessions as a guarantee of database query deduplication.

Comments — 0