Redis Caching Setup for OpenCart
9 reviewsRedis caching for OpenCart, including the invalidation problem the docs skip: on Redis the core only deletes exact keys, so stale prices linger. From 1,500 UAH.
Service
Redis caching setup for OpenCart
The file-based cache that ships by default performs acceptably on a small store. As the catalogue and traffic grow it becomes a bottleneck in its own right: every cache lookup is a disk operation, and there are dozens per page.
What is included
- installing and configuring Redis with a memory limit and an eviction policy;
- connecting the store to Redis instead of the file cache;
- a separate key namespace where several sites share a server — otherwise they overwrite each other's cache;
- cache lifetime tuned to how often your catalogue changes;
- session storage in Redis, where appropriate;
- checking the cache hit rate: if it is low, the setup achieves nothing.
What nobody warns you about
OpenCart's built-in cache invalidation is written for file storage: it deletes a group of keys by pattern. On Redis that does not work — only an exact key is removed. The consequence: you change a product and the site keeps showing the old price until the cache lifetime expires.
So connecting Redis is not just "switch the driver in the config" — it also means verifying that cache clearing after an edit genuinely works.
When Redis is not needed
If the store has a few hundred products and a dozen visitors an hour, you will not notice a difference. Redis pays off where there is load: a large catalogue, active traffic, heavy category pages.
Before and after
- The file cache slows down as the catalogue grows — every lookup is a disk operation
- Redis was connected by “switching the driver”, and an edited product still shows the old price
- Several sites on one server overwrite each other’s cache
- Redis with a memory limit and an eviction policy in place of the file cache
- Cache clearing after edits verified to actually work — no stale prices
- A separate key namespace, cache lifetime matched to catalogue updates, hit rate checked
Reviews (9)
5.0Робили нам «Налаштування Redis кешування для OpenCart» — хотів знизити TTFB без зміни хостингу. Роботу здали з документацією і поясненнями. Окремо порадували акуратністю в коді. Рекомендую без вагань.
Брала «Налаштування Redis кешування для OpenCart» для свого проєкту. Хотів знизити TTFB без зміни хостингу. Після здачі ще тиждень відповідали на дрібні питання. Роботу здали з документацією і поясненнями.
Замовляв «Налаштування Redis кешування для OpenCart» — хотів знизити TTFB без зміни хостингу. Ціна відповідала обсягу, прихованих доплат не було. Однозначно вартує своїх грошей.
Робили нам «Налаштування Redis кешування для OpenCart» — сесії з'їдали ресурс на диску. Видно, що людина глибоко розуміється на OpenCart. Після здачі ще тиждень відповідали на дрібні питання. Рекомендую без вагань.
Робили нам «Налаштування Redis кешування для OpenCart» — сесії з'їдали ресурс на диску. Після здачі ще тиждень відповідали на дрібні питання. Проблему вирішено остаточно.