What is the Smarty cache?
PrestaShop builds its pages with a tool called Smarty. Smarty is a template engine. It takes a page layout and fills it with your products and text. To save time, it keeps ready-made copies of pages. That saved copy is the cache. It is like a pre-cooked meal in the fridge.
Sometimes the copy gets old. You change a theme or a module, but the store still shows the old page. Clearing the cache throws away the old copies. PrestaShop then makes fresh ones.
Method 1: From the back office
- Log in to your PrestaShop back office.
- In the left menu, click Advanced Parameters.
- Click Performance.
- In PrestaShop 1.7, click the Clear cache button at the top. It clears Smarty and other caches.
- In PrestaShop 1.6, find the Smarty box. Look for the Clear Smarty cache button, or the main Clear cache button, and click it.
- Reload your store with Ctrl and F5 together.
While you are on this page, check the Smarty settings. In version 1.6 you can set Template compilation to Force compilation while you are editing your theme. Set it back to Never recompile template files when you are finished. That keeps the shop fast.
Method 2: Delete the cache files by hand
Use this if you cannot open the back office.
- Open File Manager in your hosting control panel.
- Go to your PrestaShop folder.
- In PrestaShop 1.7, open
var/cache. Delete the folders inside, such asprodanddev. - In PrestaShop 1.6, open
cache/smarty/cacheandcache/smarty/compile. Delete the files inside both folders. - Do not delete the empty folders themselves, and do not delete the
index.phpfiles inside them.
The first page load after clearing may be slow. That is normal while the cache rebuilds.
Quick recap
- Smarty keeps saved page copies, called a cache.
- Old copies can hide your changes.
- Use Advanced Parameters, Performance, Clear cache.
- If the back office is closed, empty the cache folders in File Manager.