Come svuoto correttamente la cache di PrestaShop?
Per svuotare correttamente la cache di PrestaShop, parti dal back office: Advanced Parameters > Performance, poi clicca Clear cache. Questo basta per la maggior parte delle modifiche a template, traduzioni e configurazione.

Quando una modifica continua a non comparire, svuota gli strati più profondi nell'ordine giusto: prima i file PrestaShop, poi OPcache, poi eventuali CDN, Varnish o cache full-page davanti al negozio.
# Run from the PrestaShop root. This deletes cache contents, not the cache directories themselves.
find var/cache/prod -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +
find var/cache/dev -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +
# Older PS 1.6-style installs may also use these Smarty paths:
find cache/smarty/compile -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +
find cache/smarty/cache -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +
# Reset web OPcache by reloading the PHP service:
sudo systemctl reload php8.2-fpm
# Apache/mod_php alternative:
sudo systemctl reload apache2Non fare affidamento su un comando opcache_reset() eseguito solo da CLI, a meno che tu sappia che PHP CLI e PHP web condividono lo stesso pool OPcache. Su un normale hosting PHP-FPM, ricaricare PHP-FPM è il reset affidabile. Dopo una pulizia a livello server, assicurati che l'utente del web server possa scrivere di nuovo nelle directory cache; una proprietà sbagliata dopo una pulizia eseguita da root è una causa comune di nuovi errori 500.
L'errore comune è svuotare solo la cache del back office e presumere che OPcache o un reverse proxy abbiano seguito la stessa operazione. Non succede. Se vuoi warming della cache e purge CDN automatico invece di farlo a mano, Performance Revolution include logica di cache warming e purge CDN, e Instant Redis aiuta a gestire un backend cache Redis.
Questa risposta ti è stata utile?
Prodotti correlati
Hai ancora domande?
Non trovi quello che cerchi? Inviaci la tua domanda e ti risponderemo.