Vivvo does not “setup” memcache (or memcached) servers. Your server administrator must install and maintain functionality of your instances.
You need to know where they are (IP addresses) and ports they operate in order to set and use Vivvo Memcache capabilities.
Memcached is high-performance distributed memory caching system that provides tremendous speed ups in web applications, and Vivvo Memcache driver uses that power to run way faster than any other caching mechanism available in current version.
There are two different memcache modules for PHP:
both supported by Vivvo Memcache application driver. You need to know what is installed on your server(s).
Configuring requires a basic knowledge of JSON format. If you are not familiar with JSON, please harvest a basic understanding how parameters can be set in your conf.php file in order to set it right. You can start from here for JSON conventions.
However, it is very easy to setup Vivvo Memcache and it requires to create two constants in conf.php and write your parameters. Default configuration looks like this (assuming you have Memcache running):
... define('VIVVO_SYSTEM_CACHE_DRIVER', 'Memcache'); define('VIVVO_SYSTEM_CACHE_DRIVER_PARAMS', '{ "Memcache":{ "servers":[ {"host":"127.0.0.1", "port":11211, "persistent":false} ], "compression":false, "namespace":"vivvo", "lifetime":0 } }'); ...
Only two constants should be added in conf.php file:
Parameters explained:
{“host”:“127.0.0.1”, “port”:11211}zlib compression. ZLib library must be installed and PHP properly configured to use it. This value is not required and default is falseMemcache(d) servers must have minimum parameters:
For Memcache additional parameter is:
For Memcached additional parameter is:
Now, if you want to use more than one server, you can simply add them to your conf.php in “servers” directive: For example, single machine but different ports:
... "servers":[ {"host":"127.0.0.1"}, // port 11211 (default) {"host":"127.0.0.1", "port":11212, "persistent":true}, // if memcache {"host":"127.0.0.1", "port":11213} ], ...
or running on different machines on port 11211:
... "servers":[ {"host":"127.0.0.1"}, {"host":"127.0.0.2"}, {"host":"127.0.0.3"} ], ...
Vivvo Memcache driver runs out of the box with default setup, but for best performances it is recommended to find your perfect config/server combination before you go on production.
Experiment a bit with compression parameter, or persistent for each instance.
Every server behave differently as this depends on it's setup and applies to every memcached instance. There are many versions of Memcache(d) and some very unstable. Be careful what you intend to use out there.