ਕੈਸ਼ਿੰਗ ਵਾਰ-ਵਾਰ ਐਕਸੈਸ ਕੀਤੇ ਜਾਣ ਵਾਲੇ ਡੇਟਾ ਨੂੰ ਇੱਕ ਤੇਜ਼ ਲੇਅਰ (ਅਕਸਰ ਮੈਮੋਰੀ ਵਿੱਚ) ਵਿੱਚ ਸਟੋਰ ਕਰਦਾ ਹੈ ਤਾਂ ਕਿ ਇਸ ਨੂੰ ਹੌੜੀ ਗਤੀ ਨਾਲ ਬਿਨਾ ਮੁੜ-ਕੈਲਕੁਲੇਟ ਜਾਂ ਹੌਲੀ ਸ੍ਰੋਤਾਂ ਤੋਂ ਮੁੜ-ਫੈਚ ਕੀਤੇ ਰੈ ਪ੍ਰਾਪਤ ਕੀਤਾ ਜਾ ਸਕੇ। ਇਹ ਪ੍ਰਦਰਸ਼ਨ ਅਤੇ ਸਕੇਲੇਬਿਲਿਟੀ ਵਿੱਚ ਸੁਧਾਰ ਲਈ ਸਭ ਤੋਂ ਮਹੱਤਵਪੂਰਨ ਤਕਨੀਕਾਂ ਵਿੱਚੋਂ ਇੱਕ ਹੈ।
ਕੈਸ਼ਿੰਗ ਕੀ ਕਰਦਾ ਹੈ
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.
