# Cache: definition

> A cache is a temporary copy of an already-computed result, kept so it doesn't have to be recalculated on every visit.

- Source canonique : [https://allaux.fr/en/glossaire/cache](https://allaux.fr/en/glossaire/cache)
- Langue : EN
- Dernière mise à jour : 2026-09-30

## Why caching exists and where it lives

Generating an e-commerce page often requires several database queries and template compilation. Repeating that work for every visitor costs server time and slows the site down. The cache stores the result the first time and serves it again on later visits, as long as the content hasn't changed.

In PrestaShop 1.7 and later, the application cache sits in var/cache/prod (or var/cache/dev); in PrestaShop 1.6, compiled Smarty templates live in cache/smarty/compile and cache/smarty/cache. In WordPress, the cache depends on the plugin in use, and often sits alongside a server or CDN cache.

The cache is also the leading cause of confusion when troubleshooting: a price or text change that doesn't show up online is often explained by an old version still being served from the cache, rather than by a genuine update failure.

## Useful habit

> After a change that doesn't seem to take effect, clearing the cache is usually the first thing to check before looking for a more complex cause.

## FAQ

### Is there a risk to clearing the cache?

No risk of data loss: the cache rebuilds automatically on the next visit. The only side effect is a slight slowdown while the first pages are recalculated.

### Why does the site stay slow even after clearing the cache?

Because another layer of caching is still active, such as one from the host or a CDN, or because the slowdown actually comes from a slow database query.

### Should the cache be disabled permanently to avoid this kind of issue?

No: the cache is precisely what keeps the site fast for most visitors. It's better to know how to clear it when needed than to do without it.
