How do you determine what data should be stored in the cache and what should not ?
Loading
How do you determine what data should be stored in the cache and what should not ?
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Sangeetha SRank #212 · 11.4K reputationPosted Jan 9, 2025, 11:14 PM EST
What to Store in Cache:
Frequently Accessed Data:
Expensive Operations:
Static or Rarely Changing Data:
Session Data:
Data with High Latency:
What Not to Store in Cache:
Large Data Sets:
Volatile Data:
Rarely Accessed Data:
Sensitive Information:
Temporary Data:
Sreenath KappoorRank #655 · 3.7K reputationPosted Jan 9, 2025, 11:21 PM EST
Caching can significantly improve performance by reducing data retrieval time and server load.
Below are some examples of data that should and should not be stored in cache:
What Should Be Stored in Cache
Static Files: CSS, JavaScript files, images, fonts.
Frequently Accessed Data: Menus, configuration settings.
Session data: User Login States.
What Should NOT Be Stored in Cache
Sensitive or Personal Data: Passwords, credit card details, private messages.
Data with Low Reuse: One-time API responses, Rarely accessed records.
Large Files: High-resolution videos, Extensive logs.
Volatile Data: Data that changes frequently and unpredictably, such as sports scores.