# Caching with Craft CMS

Source: https://docs.fortrabbit.com/guides/craft-cms/caching
Published: 2026-10-23
Reviewed: 2026-10-23

> Fragment and full-page caching for Craft CMS: the Twig cache tag, Blitz and Upper, and the cache mistakes that slow a site down.


## About caching in Craft CMS

Cache the parts of a site that repeat on every page and render them without PHP or database queries. A mega menu is a typical example: it runs the same queries, sometimes 50 and more, on every page. Caching does not replace fixing the [slow queries](/guides/craft-cms/database-queries) behind it. [Backend performance](/dev/performance/backend) covers the caching layers in general.

## Caching options

- [Twig cache tag](https://craftcms.com/docs/5.x/reference/twig/tags.html#cache): built-in fragment caching
- [Blitz](https://plugins.craftcms.com/blitz): full-page cache plugin with many options
- [Upper](https://plugins.craftcms.com/upper): integrates reverse proxies such as Cloudflare, Varnish and KeyCDN with Craft, by fortrabbit co-founder Oliver Stark

## Common cache mistakes

In our support experience, caching causes about as many problems as it solves.

- A `{% cache %}` tag without a specific key creates thousands of cache items with the same data, a poor hit rate and a lot of disk I/O.
- A full-page cache flushed every hour triggers cache warming every hour, which requests every page again.
- Pages that are not cached, such as 404 pages, still run their queries. Bots requesting `wp-login` or crawling a deep content structure hit them over and over.

## Static files in /templates

Static files such as CSS and JavaScript in the `/templates` folder get served through PHP. Place them in `/web` or a subfolder, so the web server delivers them directly.

---

- [Backend performance](/dev/performance/backend)
- [Craft CMS performance](/guides/craft-cms/performance)
