function getCacheCtrl() { if (empty($this->Cache)) { require_once 'kvs/kvs.class.php'; $dir = $this->cacheDir; $this->Cache = XKeyValueStore::factory('sqlite', array('path' => $dir . "/cache.db")); } return $this->Cache; }