[Vtigercrm-developers] memcached

Alan Bell alan.bell at libertus.co.uk
Thu Jul 17 18:25:11 GMT 2014


turns out it is a boost that is well worth having, I put this in the 
Connectors.php  file

class Vtiger_Cache_Connector_Memcached {
         private $m;
         function __construct(){
                 $this->m = new Memcached();
                 $this->m->addServer('localhost', 11211);
         }

         function set($key, $value) {
                 $this->m->set("vtiger$key",$value);
         }
         function get($key) {
                 return $this->m->get("vtiger$key");
         }

     function flush(){
         return true;
     }
}

and in the Connector.php file I just commented out the memory cache and 
added the memcached class
//                      $this->connection = new 
Vtiger_Cache_Connector_Memory();
                         $this->connection = new 
Vtiger_Cache_Connector_Memcached();

and things are getting quite quick :)

I had to also install memcached and php5-memcache packages (perhaps 
php5-memcached too, not quite sure which one was important) and restart 
apache to turn on the new module.

Alan.



On 17/07/14 18:32, Alan Bell wrote:
> would I be right in thinking that the stuff in includes/runtime/cache 
> is kind of a non-persistent cache that is discarded on every call, it 
> makes things a touch more efficient, but if that had a memcached 
> connector things might really start to pick up? Is there a plan to do 
> that?
>
> Alan.
>


-- 
Libertus Solutions
http://libertus.co.uk



More information about the vtigercrm-developers mailing list