Many visits request content that has not changed since the previous visit.
A cache stores results for reuse. When a stored result is valid for the next request, the server can avoid some of the work needed to build it again.
We use WP Accelerate caching on the HyperWP platform. The idea is simple. Where a result is safe to reuse, the server can skip the processing needed to produce it again.
The work behind a page
A WordPress page may bring together a theme, plugins and data from the site. Some visits need that work to happen again. Others ask for content that has not changed.
Caching gives the platform a way to reuse suitable results. What is stored, and when it can be used, depends on the setup.
That can help a page reach readers sooner. It can also leave more server time for tasks such as search queries and cart updates.
Why repeat visits can feel different
You may have seen a page feel quicker on a later visit. There can be several reasons, including caches in the browser or on the server.
A warm cache has a useful saved result ready. A cold cache does not. The first request after a cache is cleared may need more work. Later requests may be able to use the saved result.
A cache hit reuses a stored result. A cache miss means the result is not available, so the application must generate it.
Cache rules and content updates
A news post may stay the same for lots of readers. A customer’s basket does not. Private pages and personal data need rules that keep each person’s content their own.
Cached content also needs to stay up to date. When you change a page, the cache may need to clear its old copy or save a new one. A cache needs a way to expire or clear saved content when that is required.
For WP Accelerate, the rules in use decide those details. We do not assume that every URL is cached, or that every kind of content should be.
Helping the rest of the platform
Our CPUs and NVMe drives still have work to do. A cache does not replace them. It can reduce how often the same work reaches them.
This helps when many users request the same public content. Reusing a valid result can ease demand while helping the page feel prompt.
A cache reduces how much work must be done for the next request. When PHP must generate a page, the speed of the code, CPU and storage still matters.