Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 881
Bhavin Avatar asked Aug 12 '15 06:08

Bhavin


People also ask

Is cache client or server-side?

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.

What is cache in server?

A cache server is a dedicated network server or service acting as a server that saves Web pages or other Internet content locally. By placing previously requested information in temporary storage, or cache, a cache server both speeds up access to data and reduces demand on an enterprise's bandwidth.

Where is cache server located?

Some of the most notable caching locations are: At the Web client and browser. At the Internet Service Provider (Akamai is an example). In a caching proxy server located in front of the application server.

Is Redis client-side or server-side?

Redis is an open-source in-memory database with a reputation for working exceptionally well for caching web application data. Redis's fast transactions and low latency help to increase application performance while its server-assisted caching feature makes client-side caching more efficient.


1 Answers

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.

like image 148
Quentin Avatar answered Oct 12 '22 13:10

Quentin