A cache is a stored copy of a page or query result, so it doesn't have to be rebuilt on every request.
A cache is a store of ready-made answers. Instead of doing the same work again and again, a system saves the result the first time and hands out that saved copy to the next visitor who asks for it.
Take a WordPress page. Without a cache, every visit makes PHP run, queries the MySQL database and builds the HTML from scratch. With a page cache, the finished HTML is saved once and sent straight to the next visitor, which can turn a response of half a second or more into a few milliseconds.
Types of cache on a website
Most sites benefit from several layers of caching working together:
- Page cache: stores complete HTML pages on the server. LiteSpeed's LSCache is one example.
- Object cache: stores the results of database queries in memory, using tools like Redis or Memcached. It helps pages that can't be fully cached, like carts and logged-in dashboards.
- Opcode cache: PHP's OPcache keeps compiled PHP code in memory so scripts don't need recompiling on every request.
- Browser cache: a visitor's browser keeps images, CSS and scripts so repeat visits load faster.
- CDN cache: copies of your files are stored on servers around the world, closer to visitors.
Why caching matters for your website
Caching makes pages load faster, which improves your TTFB and Core Web Vitals scores and keeps visitors from leaving. It also reduces the work your server does, so the same hosting plan can handle many more visitors during a traffic spike.
How to clear your cache
When you update your site and don't see the change, a cache is usually serving the old copy. Clear it in this order:
- Your caching plugin or the host's cache tool.
- Your CDN, if you use one.
- Your browser, or test in a private window.
Common cache problems
- Changes not showing: an old cached copy is still being served. Purge it after updates.
- Logged-in content shown to others: pages like carts, checkouts and account areas must be excluded from page caching. Good caching plugins do this for common platforms automatically.
- Too many caching plugins: running two page caches at once can cause conflicts and broken layouts. Use one.
- Cache never warming: on low-traffic sites, pages may expire before anyone visits. Some tools can crawl your site to pre-build the cache.
On AblePage, every plan uses LiteSpeed, WordPress sites can use LSCache, and Redis object caching and a PHP OPcache toggle are available.