What it does for your store
- Pages served instantly.Saves each generated page and delivers it to subsequent visits without PrestaShop having to reassemble it.
- Queries served from memoryWith Redis, repeated queries are served from memory; carts, orders, and customers are never cached.
- Bots served from theGoogle cache and AI crawlers receive the saved page even if it has expired, without reloading the server.
- Always shop up to date.Never saves cart, payment, or pages of identified customers, and you can exclude any addresses you want.
- Self-emptying cache:With automatic purging, when products, prices, categories, discounts, or CMS pages change, the cache is emptied and your customers see the latest updates.
- Control from theHit Statistics panel and buttons to clear the entire cache, a specific URL, or the OPcache URL without entering the server.
All In One Cache module with Redis by @thisjrodriguez
🚀 AllInOneCache: Comprehensive High Performance for PrestaShop
It drastically reduces loading times and server load by acting on three levels: Full Page, Database (Redis), and Bytecode (OPcache) . Compatible with versions 1.7, 8.x, and the upcoming 9.x.
- ✔Page Cache: Serves static HTML without executing PHP.
- ✔Object Cache: Intercepts SQL queries and serves them from Redis.
- ✔Smart Purge: Intelligent self-cleaning using PrestaShop hooks.
Installation, updates and support
Installation and training
It's not included, but we'd be happy to help you with anything you need: just write to us and we'll take a look.
Lifetime updates
Get permanent access to the latest version of your module. Your investment is protected, and we'll always try to update it to the latest versions of PrestaShop.
Certified quality
Our modules have passed the official PrestaShop validation, ensuring their security, performance and compatibility with the platform's standards.
Medium
This module does not include support, but you can ask us for help and suggestions for improvement, and our expert team will try to address them. If you need support from the team, you can contract our services.
Why did we create this module?
The new bot loads are crashing many servers; this module is a lifesaver for most websites. It's our small contribution to the PrestaShop community.
Thanks to Julio Rodriguez, the loading problems of thousands of websites have been improved and resolved.
AllInOneCache
High-Performance All-Around for PrestaShop
It operates on three levels
AllInOneCache
- Saves entire pages to disk to serve them without running PHP
- Store SQL query results in Redis to avoid database access
- Manages the PHP bytecode cache (OPcache).
🌐 Page Cache
It saves the complete HTML of each page to disk. Subsequent visits receive the file directly, without PrestaShop or PHP executing anything.
- It allows you to skip the shopping cart, checkout pages, and other URLs using regular expressions.
- Generates separate cache versions for mobile, tablet, and desktop.
- Bots and crawlers (Google, GPTBot…) always receive an instant response, even if the cache has expired.
- Configurable TTL — default 3600 s (1 hour).
- Optional minification of HTML, inline JS and inline CSS.
- Removal of HTML comments and automatic lazy loading of images.
- Auto-purge configured via hooks: products, categories, CMS, special prices, discounts, combinations, manufacturers, suppliers, and store configuration.
- Real-time statistics panel: hits, misses, total requests and hit rate.
- Manual purge available: clear the entire cache, purge a specific URL, or clean everything with a single click.
🗄️ Database Cache
It intercepts PrestaShop SQL queries and stores the results in Redis. The same queries are served from memory without accessing the database.
- 🔹 Connection via TCP/IP or Unix Socket.
- 🔹 Configurable query TTL — default 1800 s (30 min).
- 🔹 Each table in the database can be activated or deactivated individually from the panel.
- 🔹 Critical tables (orders, sessions, cart…) are locked and never cached.
- 🔹 Auto-purge configured via hooks: products, categories, CMS, etc.
- 🔹 Statistics panel: hit rate, memory used, total keys and operations/sec.
- 🔹 Manual purge available from the admin with one click.
⚡ Bytecode Cache
Manages the PHP compiled bytecode cache. Allows purging from the administration panel without requiring direct server access.
- Manual purge from the admin with one click (
opcache_reset()). - Automatically included in the global purge along with the rest of the caches.
- Statistics panel: hit rate, memory used, cached scripts, and restarts per OOM.
- Auto-purge configured via hooks synchronized with the store.
Advanced Technical Information
File architecture
| Archive | Responsibility |
|---|---|
allinionecache.php | Main class. Registers hooks, manages install/uninstall/reset, triggers the auto-purge of both caches when content is modified in the back office. |
classes/RedisCache.php | Manages the connection to Redis. The connection is opened only once and reused for all queries. Supports TCP/IP and Unix sockets. |
classes/PageCache.php | Full-page caching engine. Serves HTML from disk before PrestaShop starts, saves the generated response, applies minification, lazy loading, and bypass logic (bots, logged-in users, shopping cart, URL exclusions). |
classes/PageCacheStats.php | Log page cache hits and misses to a locked JSON file flock() to avoid race conditions in concurrent environments. |
db_overrides/classes/db/DbMySQLi.php | PrestaShop MySQLi driver override. Intercepts executes, , getValue and getRow For caching SQL results in Redis. Includes anti-recursion protection. |
db_overrides/classes/db/DbPDO.php | PrestaShop PDO driver override. It intercepts the same functions as DbMySQLi to cache SQL results in Redis. PrestaShop uses one or the other depending on the server configuration. |
controllers/admin/AdminAllinionecacheController.php | Admin panel controller. Manages all AJAX actions: purges, statistics, table configuration, Redis connection testing, and diagnostics. |
views/templates/admin/configure.tpl | Smarty template for the panel. Includes tabs by section, configuration toggles, a cacheable table of tables with filters, and statistics graphs. |
Configuration keys
| Clue | Description | Default |
|---|---|---|
ALLINIONECACHE_CACHE_TYPE | Cache type: redis or empty | — |
ALLINIONECACHE_REDIS_HOST | Redis Host | 127.0.0.1 |
ALLINIONECACHE_REDIS_PORT | Port Redis | 6379 |
ALLINIONECACHE_REDIS_DATABASE | Redis database number | 0 |
ALLINIONECACHE_REDIS_PASSWORD | Redis Password | — |
ALLINIONECACHE_QUERY_TTL | TTL queries Redis (seconds) | 1800 |
ALLINIONECACHE_PC_ENABLED | Page cache enabled | 0 |
ALLINIONECACHE_PC_TTL | TTL page cache (seconds) | 86400 |
ALLINIONECACHE_PC_BOT_STALE | Serve expired cache to bots | 1 |
ALLINIONECACHE_PC_AUTO_PURGE | Automatic purging when content is modified | 0 |
ALLINIONECACHE_PC_VARY_DEVICE | Cache separated by device | 0 |
ALLINIONECACHE_PC_MINIFY_HTML | Minify HTML | 0 |
ALLINIONECACHE_PC_MINIFY_JS | Minify JS inline | 0 |
ALLINIONECACHE_PC_MINIFY_CSS | Minify inline CSS | 0 |
ALLINIONECACHE_PC_LAZY_IMAGES | Add loading="lazy" to images | 0 |
ALLINIONECACHE_TABLE_CONFIG | JSON configuration of cacheable tables | — |
Tables always locked (Critical Security)
The following tables are never cached in Redis to ensure the absolute integrity of transactional data:
HTTP Headers of the Page Cache
| Header | Worth | When |
|---|---|---|
X-Cache | HIT | Valid cache served |
X-Cache | HIT-STALE | Expired cache served to bot |
X-Cache-Generator | AllInOneCache | In all cached responses |
Cache-Control | public, max-age=N | Normal response from cache |
Cache-Control | no-store | Expired cache served to bot |
Age | Seconds since it was generated | In all cached responses |
Cache key
query_{tabla}_{md5(sql)}Table purge: query_{tabla}_*
md5(shop_lang_currency_device_url)Directory: /var/allinionecache/
Compatibility
| System | Version | State |
|---|---|---|
| PrestaShop | 1.7.6 ,8.x, 9.x | Supported |
| PHP | 7.2 — 8.3 | Supported |
| Redis | 4.x, 5.x, 6.x, 7.x | Supported |
| Driver DB | MySQLi + PDO | Both supported |
| Multistore | — | Supported |
Professional optimization of Rekire for high-performance eCommerce.
- Brand
- Referencemod114
| Version | 1.1.6 |
|---|---|
| Compatibility | PrestaShop 1.7.8 – 9.1 (in 1.7.8 , without Redis; complete from 8.1) |
| Multistore | Yes: separate page cache by store, language, currency, and device |
| Languages included | Spanish and English |
| Modify the core | Yes, when activating Redis: Db, DbMySQLi and DbPDO overrides |
| Own tables | None |
| Requirements | For query caching, a Redis server and the PHP redis extension are required; page caching works without them. |
v1.2.6
- With the store in maintenance mode, the cache is no longer accessible to the public. Pages are served before PrestaShop checks for maintenance, so a page saved by someone testing the store (from an allowed IP address) was seen by any visitor instead of the maintenance notification. Now, with the store closed, only IP addresses allowed during maintenance are served and cached; everyone else receives the PrestaShop notification. Updating the site clears the page cache.
v1.2.3
- Visitors who have already decided on the cookie banner will see the cached page again. Until now, with Hipresta "Cookie Consent" (
hicookielaw) or Cookies Plus, any visitor who accepted or rejected cookies browsed without cache for the remainder of their visit (in a measured store, 1.5-2 seconds per page versus 0.3 seconds). Now, each decision has its own copy of each page: no decision, "accept all," "only necessary," and every combination of purposes; a visitor will never see another decision page (the notice, Google consent mode, and blocked modules are their own). Purging a URL also deletes these copies. - The date and proof of consent for each visitor are not stored in the cache (
hicookielawpanel; date and hash in theC_P_COOKIE_VALUEvariable of Cookies Plus, which your JavaScript reads from the cookie). - The cache remains empty for those who decided in
hicookielawwhen the module hides the warning by country or the visitor's IP is on their whitelist, and for those who have a decision in Cookies Plus prior to "Revoke consents" (Cookies Plus resets it on that page). Changing that date clears the page cache. - Updating clears the page cache.
v1.2.2
- Emptying the combined CSS and JS no longer leaves pages without styles: their versions are key to the cache, a page painted while they were changing is not saved, and old copies are automatically deleted.
- Other modules can request a separate version of the page using
$_SERVER ['ALLINONECACHE_VARIANT'], placed before this module in `actionDispatcherBefore(used by RKR Connectif by country 1.3.1 , whose HTML depends on the visitor). Purging a URL also deletes its variants. - New option "Serve cache to PageSpeed" (off by default): Lighthouse receives the same page as clients and measures its actual response time.
v1.2.1
- The "Images in WebP and mobile-friendly" option from version 1.2.0 has been removed: PrestaShop now generates WebP and AVIF images automatically (Design → Image Settings), and that's where they should be configured. Updating clears the page cache and deletes any copies that may have been made (
img/aioc/i/). - "Font visualization" remains the same.
v1.2.0
- New option "Images in WebP and scaled for mobile" (Images tab, off by default): JPG and PNG images for the store (products, categories, banners, logo) are served in WebP, and on mobile and tablet, those wider than the screen are reduced (828/1280 px). Copies are made once in
img/aioc/i/; each generated page takes a maximum of 2 seconds to convert, and an image that wouldn't be smaller in WebP remains unchanged. In a store with large banners, the mobile homepage image size went from 4.4 MB to 1.9 MB. - New "Font Display" option (Assets tab, disabled by default): Google Fonts with
display=swapandpreconnectto fonts.gstatic.com , andfont-display:swapin the@font-facethat don't already have it, also in the theme's stylesheets (a corrected copy is served fromimg/aioc/css/). The text is displayed without waiting for the font to arrive. - Turning either on or off clears the page cache. Uninstalling the module deletes the copies in
img/aioc/.
v1.1.13
- Compatible with Hipresta "Cookie Consent" (
hicookielaw): No page is served or cached for users who have already opted into cookie settings. This module stores the decision within the PrestaShop cookie and modifies the HTML accordingly (notice, Google consent mode, blocked modules), so a new visitor could receive a page from someone who had already opted in: without a notice and with consent already granted. The page cache is cleared upon refreshing. - Pages served from cache use
Cache-Control: private, no-cacheinstead ofpublic, max-age=…. The browser no longer reuses a saved page without asking: after adding to the cart or logging in, the cart and session are visible, and no intermediary proxy or CDN saves the page.
v1.1.12
- The main image on the page (the one marked with
fetchpriority="high": homepage, product page, category) no longer loads withloading="lazy". Previously, with both "Image Priority" and "Lazy Image Loading" enabled, the former would disableloadingand the latter would applylazyloading, causing the browser to take a long time to request the largest image (LCP). Now, the priority image and header images useloading="eager", and lazy loading respects any image withfetchpriority="high".
v1.1.11
- Purging a URL (using the panel button and
PageCache::purgeByUrl()) didn't delete anything: it searched for the file without specifying the device or the bot variant that shares its name. Now it deletes all versions (desktop, tablet, mobile, and bots, including the.brextension) and normalizes the URL just like when saving. - Purging a URL no longer resets the hit statistics for the entire cache; it is recorded in the purge log.
v1.1.10
- The first visit after a purge (MISS) receives the same processed HTML (minified, WPO) that is saved in the cache, not the original: before it weighed more than the following ones (550 KB versus 457 KB on rekire.com ).
v1.1.9
- The page generated at that moment (the first visit after a purge, and the PageSpeed/Lighthouse page, which never uses cache) is also compressed and has the same
Content-Lengthas cached pages, instead of beingchunked, which is why PageSpeed gives a "NO_LCP" rating. PrestaShop continues its normal process: it is buffered and sent upon completion. - Saving a cart rule no longer clears the cache, unless it's a highlighted rule and applies to everyone: vouchers created by modules for a customer don't change any cached pages. Neither do specific cart or customer prices.
- Saving the settings only clears the cache if the key changes what the visitor sees (store name and details, logo, default language and currency, catalog mode, taxes, stock, friendly URLs, etc.).
- Each purge is recorded with its reason and the URL that launched it (the last 200, in
var/allinonecache/ _purgas.log); the panel shows the last 15. - Deferred images (WPO): the loader starts when the document is ready and monitors the images that are added later, so those created or moved by a JS from the theme loaded with
deferare also loaded (previously they would not be loaded). - Homepage preheating:
/module/allinonecache/precalentar?token=…(the URL is displayed in the panel) requests the homepage for each language on desktop and mobile. Designed to be a scheduled task every 10 minutes: if it's cached, it doesn't cost anything; if a purge cleared it, it generates it before a visitor arrives.
v1.1.8
- The page cache is served already compressed (brotli or gzip, depending on the browser) with
Content-LengthandVary: Accept-Encoding, instead of decompressing it for the server to recompress on the fly. This results in less CPU usage per visit and nochunkedresponses, which caused PageSpeed Insights to report "NO_LCP" in many runs. - The
.brfrom the previous version is deleted before the new one is added, and it is only served if it is not older than the gzip file: two versions of the same page are never mixed. - If PHP compresses the output (
zlib.output_compression), the page is sent uncompressed to avoid compressing it twice.
v1.1.6
- Improved. Better error handling throughout the module.
- Fixed Several bugs have been fixed, including one when uninstalling the module.
2026/04/10
v
- Improved Optimization and configuration improvements.
- Improved: The Redis cache no longer acts on the back-office.
2026/03/20
v
- Corrected . Minor corrections.
2026/03/18
v
- New First fully functional version.
You might also like
4 other products in the same category
También podría interesarte
Questions and answers
¿Necesito tener Redis en mi hosting?
0Solo para la caché de base de datos: necesita la extensión PHP de Redis y un servidor Redis accesibles desde tu hosting. La caché de página completa y la gestión de OPcache funcionan sin Redis.
¿Con qué versiones de PrestaShop funciona?
0Desde PrestaShop 1.7.6. La caché de página y OPcache funcionan en todas esas versiones; la caché de consultas en Redis, desde PrestaShop 8.
¿Puede servir a un cliente un carrito o un pedido que no es el suyo?
0La caché de página permite dejar fuera el carrito, el pago y cualquier URL que indiques con una expresión regular. En la caché de base de datos, las tablas delicadas (pedidos, carritos, sesiones y stock, entre otras) vienen bloqueadas de serie y nunca se cachean.
Si cambio un precio o un producto, ¿tengo que vaciar la caché a mano?
0No hace falta: la purga automática va enganchada a PrestaShop y vacía la caché de página al guardar productos, categorías, páginas CMS, precios específicos, reglas de carrito, combinaciones, fabricantes o proveedores. Si quieres hacerlo tú, desde el panel vacías la caché de página, la de Redis, OPcache, una URL concreta o todo a la vez.
¿Modifica archivos de PrestaShop?
0La caché de base de datos funciona sustituyendo los controladores de base de datos de PrestaShop (MySQLi y PDO) mediante overrides. Tenlo en cuenta si tu tienda ya usa otros overrides sobre esas clases.
¿Cómo sé si la caché está funcionando?
0El panel muestra estadísticas en tiempo real: aciertos, fallos y porcentaje de aciertos de la caché de página, y en Redis la memoria usada, las claves y las operaciones por segundo. Las páginas servidas desde caché llevan además la cabecera HTTP X-Cache: HIT.



























