In our previous article, we have discussed what a WordPress caching is and how is it important. In this article, we aim to make you learn how it actually works.
Before we get to how caching works, let us discuss little about the protocols available named:
1- Client-Side Caching
2- Server-Side Caching
Client-side caching works in a way that it helps the clients in reusing the data cached before. You must be thinking what a cached data is? Let us tell you.
You must be aware that a website contains numerous things such as images, files, etc. Once these are downloaded, your browser easily downloads it for the next time. This means that the cached data is saved in your computer hard disk. Cleaning the browsers cache will save a lot of your space.
This client-side caching is mostly supported by all browsers and it saves a lot of time plus a lot of server resources are saved.
This includes all those protocols that are used in WordPress caching which are listed as follows;
1- Page Caching
This is one of the easiest and simpler protocol as it simply saves the HTML files and serves them from the cache. This is one of the cheapest process it saves overhead cost of executing the PHP code and other queries such as MySQL database.
2- Database Caching
It aims to save, update and deliver the efficiency of the data and s known as one of the resource hungry protocol. WordPress is dependent on it database highly and the chances of queries are therefore higher. Where a database is updated, the previous one should be deleted. This helps in eliminating the query results that contains errors.
3- Object Caching
This is the subsystem of the internal caching system of WordPress that allows the plugins to manage the system so that number of database calls can be reduced.
4- Opcode Caching
It aims to save the PHP code between every request it receives. PHP is a programming language and it generates the executable code for the webserver to execute. This is also internal to the WordPress Caching.