Caching తరచుగా యాక్సెస్ చేయబడిన డేటాను వేగవంతమైన లేయర్లో (తరచుగా మెమరీలో) నిల్వ చేస్తుంది కాబట్టి దానిని పూనుకోవడం లేదా నెమ్మదిగా ఉన్న సోర్సుల నుండి మళ్లీ పొందకుండా త్వరితంగా పొందవచ్చు. ఇది పనితీరు మరియు స్కేలబిలిటీని మెച్చుకోవడానికి అత్యంత ముఖ్యమైన పద్ధతుల్లో ఒకటి.
Caching ఏమి చేస్తుంది
CACHING stores copies of data in a FAST location for quick repeated access:
→ instead of recomputing or re-fetching from a slow source (database, API, computation),
serve from the fast cache
→ DRAMATICALLY faster (cache hit) + REDUCES load on the slow backend
→ trades some staleness/complexity for big performance and scalability gains.
Caching ఎక్కడ ఉపయోగించబడుతుంది (లేయర్లు)
BROWSER / CLIENT cache → cache on the user's device
CDN → cache static content at edge locations near users
APPLICATION cache (e.g. Redis/Memcached) → cache DB query results, computed data, sessions
DATABASE cache → query/result caching
→ caching can happen at MULTIPLE layers (defense in depth for performance)
