कॅशिंग हे वारंवार वापरल्या जाणारे डेटा एका जलद लेयरमध्ये (सहसा मेमोरीमध्ये) साठवते जेणेकरून ते पुन्हा कम्प्यूट किंवा हळू स्त्रोतांमधून पुन्हा मिळवण्याची गरज न पडता त्वरीत पुनर्प्राप्त केले जाऊ शकते. हे कार्यक्षमता आणि स्केलेबिलिटी सुधारण्यासाठी सर्वात महत्वाचे तंत्रांपैकी एक आहे.
कॅशिंग काय करते
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.
कॅशिंग कोठे वापरले जाते (लेयर्स)
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)
