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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sangeetha SPosted Jan 10, 2025, 4:14 AM
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 KappoorPosted Jan 10, 2025, 4:21 AM
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.