简体   繁体   中英

Cache is client side or server side?

I am confused in "cache". Is it client side or server side? How to store cache client side and how to store cache on server side? And If cache store in server side then why people do clear cache in browser?

Is it client side or server side?

It can be either, or both.

Server side caches are generally used to avoid making expensive database operations repeatedly to serve up the same content to lots of different clients.

Client side caches are used to avoid transferring the same data over the network repeatedly.

How to store cache client side

Send cache control HTTP response headers such as:

Cache-Control: max-age=86400, must-revalidate, public

how to store cache on server side?

Generally this would be done using specialist frontend caching servers such as Memcached .

You tagged this ASP.NET so it is worth pointing out that it has built-in caching .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM