Installer le plugin DB Cache, l'activer et modifier db-functions.php comme suit :

<?php
/**
 * Cache framework
 * Author: Dmitry Svarytsevych
 * http://design.lviv.ua
 * Memcached Support by Romain BOURDY 
 * http://www.aki-project.net
 */

class pcache {

        var     $m;

        function pcache(){
                $this->m = new Memcache();
                $this->m->connect('localhost', 11211);
        }

        function load($tag = '') {
                if ($tag == '') return false;
                return $this->m->get('wp_db_'.$tag);
        }

        function save($value = , $tag = ) {
                $this->m->set('wp_db_'.$tag,$value,MEMCACHE_COMPRESSED,600);
                return true;
        }

        function remove($tag = '', $dir = false) {
                $this->m->delete('wp_db_'.$tag);
                return true;
        }

        function clean($old = true) { }
}
?>

TODO :

  • Gerer les clean()
  • Gerer le timeout
  • Prefixe personalisé ?