Caching Flashcards
What is Caching?
cache is a high-speed data storage layer which stores a subset of data so that future requests for that data are served up faster than is possible by accessing the data’s primary storage location.
What is Cache Invalidation?
Cache invalidation refers to process during which web cache proxies declare cached content as invalid, meaning it will not longer be served as the most current piece of content when it is requested.
What usually should be cached?
The results for the following processes are good candidates for caching:
- Long-running queries on databases and computation-intensive processing
- high-latency network requests (for external APIs),
- Static content
Cache busting
Cache busting is essentially when you change the name of your static assets (the files on your page) so the user’s browser knows that this is a file that should be downloaded afresh. If you’re using Webpack, a common way to do this would be to include a hash in the file name.