Caching with Memcache

PHP Memcache 3.0.8 Windows

Memcache can have a massive performance increase on small stores with lots of memory.

It's a trade off between taking up less space or eating up more CPU cycles.

Be sure to check your phpinfo() has 'Memcahe' enabled before making this change.

  1. Add below code to: config.php AND admin/config.php

    // Cache
    define('CACHE_DRIVER', 'mem'); // 'file', 'apc' or 'mem'
    define('CACHE_HOSTNAME', 'localhost');
    define('CACHE_PORT', '11211');
    define('CACHE_PREFIX', 'oc_');

  2. Edit index.php  AND admin/index.php

    $cache = new Cache('file');

    $cache = new Cache(CACHE_DRIVER);