Monthly Archives: October 2014

OpenCart Database Cache

I recently developed a plugin for OpenCart, the plugin (excuse the cheese) is called: Super FAST Database Cache.

I’ve been using OpenCart for years, and prefer it over Magento for a dedicated shopping cart (I’m quite fond of WooCommerce too). I decided to bundle up this plugin as I wrote it for a website that required a bit of a better caching solution than the out-of-the-box caching that ships with OpenCart.

The plugin is purely a database cache. It replaces the default MySQL driver, rather than the somewhat dirty vqMod implementations that seem to be the norm. The only drawback is that different OpenCart versions have different class names and locations for the drivers, even on minor version changes.

So how does it work? The database driver will MD5 hash the query, and check if a cache file exists with that name, if so (and it hasn’t expired)…