for compiling under hiphop

This commit is contained in:
Shish 2010-05-15 14:53:37 +01:00
parent e731b59676
commit 23216d7549

View File

@ -180,12 +180,14 @@ class NoCache implements CacheEngine {
public function get_misses() {return 0;} public function get_misses() {return 0;}
} }
class MemcacheCache implements CacheEngine { class MemcacheCache implements CacheEngine {
var $hits=0, $misses=0; var $memcache=null, $hits=0, $misses=0;
public function __construct($args) { public function __construct($args) {
$hp = split(":", $args); $hp = split(":", $args);
$this->memcache = new Memcache; if(class_exists("Memcache")) {
@$this->memcache->pconnect($hp[0], $hp[1]); $this->memcache = new Memcache;
@$this->memcache->pconnect($hp[0], $hp[1]);
}
} }
public function get($key) { public function get($key) {