Latest Blog Posts

Editing the OpenCart Homepage
29.09.2025 2665 3 44 min

Editing the OpenCart homepage, customizing H1 and Title text, displaying products and modu..

How to Uninstall Powered by OpenCart
03.09.2025 4134 3 20 min

Remove Powered by OpenCart and customize footer: edit template, use theme editor or OCMOD ..

How to remove modules in OpenCart
28.08.2025 2113 3 12 min

Step-by-step instructions for deleting modules in OpenCart 3 via the admin panel, manually..

Which hosting to choose for OpenCart
25.08.2025 1432 3 19 min

Find out which hosting to choose for an OpenCart online store. Requirements, selection cri..

How to clear the cache or turn off caching in OpenCart

12274 2 5 min
How to clear the cache or turn off caching in OpenCart

When you manage an online store on OpenCart, you eventually run into caching. The platform uses several types of cache at the same time. One type is responsible for OCMOD modifications, and another one is used by the Twig template engine, which helps pages load faster. As long as everything runs smoothly, the cache stays invisible. But once you update a module, adjust a template, or change a modification, the store may still behave as if nothing changed. That’s when you need to refresh or remove the cached OCMOD files manually, perform a full Twig cache cleanup, or even disable caching completely to make sure your changes are actually applied. This is where tools like an opencart cache extension or an opencart cache plugin become essential.

What cache is in OpenCart

OpenCart generates temporary files that help speed up page rendering and reduce server load. The system relies on two main types of cache, both stored inside the opencart cache folder:

Main cache types

  1. OCMOD modification cache
    • OpenCart merges changes applied by modifications and stores the compiled result as cached files. Until you clear this cache, the system keeps using the old code, even if the extension was updated. That’s why many developers use tools like opencart clear ocmod cache on ftp or manually remove it.
  2. Twig template cache
    • Twig compiles templates into optimized files. This speeds up page rendering but can also prevent updated templates from loading if the cache wasn’t refreshed.

Both caching systems improve performance, but they also cause those typical moments when you urgently need opencart clear all cache or to figure out why the cache doesn’t refresh after template updates. This is especially common in opencart 3, where developers often use opencart 3 clear all cache tools or custom scripts to reset everything at once.

How to update or remove the OCMOD cache manually

Sometimes the default cache clearing in the admin panel doesn’t help. In that case, a manual cleanup is necessary.

Where OCMOD modification files are stored

All compiled modifications are stored in /system/storage/modification/. Inside this folder, you’ll see a structure that mirrors the root of your site. These files represent the modified version of your store’s code. If you’re working with extensions, this is also where you might modify cached OpenCart extension files manually.

How to manually remove OCMOD cache

  • Open the modification folder
    • Delete everything inside it
    • Then go to the admin panel and refresh the modifications again

This method works when a module added conflicting rules, the cache got stuck, or the system can’t overwrite the compiled files automatically. In cases like this, developers often rely on opencart remove cache scripts or an opencart cache module to automate the process.

When manual refresh is required

You may need to clear the cache manually in situations such as:

  • after installing or removing a modification
  • when errors appear after updating OCMOD files
  • if a module added incorrect logic and the modification system froze
  • when opencart cache clear inside the admin panel doesn’t work

Twig caching settings in OpenCart 3

OpenCart 3 uses Twig as its template engine. It’s fast and flexible, but it also tends to keep outdated compiled templates even after you update the actual files.

Caching settings

In the admin panel, you can enable or disable Twig cache. These options belong to the opencart 3 admin cache system and allow you to control how deeply templates are cached. Many developers adjust these settings while debugging.

When you should disable Twig cache

Disabling Twig caching helps when:

  • you’re developing or adjusting a template
  • you’re fixing layout or display issues
  • the store shows old template versions after updates
  • you’re testing dynamic or frequently changing visuals

How Twig cache works

The engine compiles templates and stores them in /system/storage/cache/. Clearing this folder resets the compiled Twig templates. This is part of the standard opencart cache settings and is often used together with opencart 3 disable ocmod cache for full debugging mode.

How to disable caching in OpenCart

Sometimes you need to completely disable caching to confirm that updates are being applied correctly. This is especially helpful during development, testing, or diagnosing conflicts caused by extensions or incorrect template logic.

Disabling different types of caching

Template cache
Controlled through the Developer Settings in the admin panel. Turning it off helps during template editing and debugging.

OCMOD modification cache
You can disable OCMOD entirely, but only temporarily. Many users rely on opencart cache extension or opencart cache plugin solutions to manage this safely.

SEO Pro cache
SEO Pro generates its own cached URLs. If you’re debugging SEO or URL rewriting, you’ll need to clear or disable this cache as well.

Possible performance impact

  • pages may load slower
  • server load increases
  • response times may spike under heavy traffic

For that reason, caching should be disabled only during debugging or development. Understanding how the opencart page cache works and how to work with the core opencart cache system helps prevent conflicts, speed up troubleshooting, and keep your store stable. Whether you're using a cache module, a plugin, or the built in tools, learning how to perform a full opencart cache clear ensures your changes apply exactly as intended.

Products related to this post

Cache Cleaner module
699 грн.499 грн.
Clear modification cache, logs, images and system cache with one click from any page in the admin panel using AJAX...
ChatGPT Consultant

Comments

Leave your comment or question
Как отключить кэширование изображений?
Answer Admin

Если речь именно идет о ресайзе изображений, то это уже не тот кеш, который описан в статье. В OpenCart нет отдельного переключателя, который «отключает ресайз», потому что уменьшенные копии создаются самим движком при первом обращении. Далее они просто лежат в папке image/cache и используются повторно — это и воспринимается как кеш.

Если вы хотите изменить поведение ресайза, отключить создание миниатюр или заставить систему генерировать их заново, это уже другая тема и решается по‑другому — через правки движка, функции image->resize или альтернативные механизмы работы с изображениями.

Можете написать в техподдержку, там помогут подобрать решение под ваш случай.

Кеш шаблонов. Включается и выключается в настройках разработчика. Где находится данный пункт в админке?
Answer Admin

В OpenCart 3 переключатель кеширования шаблонов спрятан в меню настроек разработчика. Если коротко, путь такой:

На главной странице административной панели в правом верхнем углу найдите кнопку с иконкой в виде шестеренки.

Там вы увидите опцию, которая отвечает за кеш Twig. Именно она включает или отключает компиляцию шаблонов. Этот пункт связан с тем, что в OpenCart шаблоны проходят обработку Twig и сохраняются в кеш (как описано в статье), поэтому во время правок удобно временно отключить кеширование, чтобы сразу видеть изменения.

Кеш шаблонов включается и выключается в настройках разработчика

Write Comment

Popular