Lines Matching refs:key

6 	protected static function normalize_key($key){  argument
9 $key);
12 protected static function denormalize_key($key){ argument
15 $key);
45 public static function add($key, $val,$ttl = 0){ argument
46 …if (MEMCACHE_CHECK_KEYS && !is_string($key)) trigger_error("The key needs to be string! (note: not…
47 …atic::$cache_dir.static::normalize_key($key)) && @file_put_contents(static::$cache_dir.static::nor…
48 if ($ttl > 0) file_put_contents(static::$ttl_dir.static::normalize_key($key),time()+$ttl);
49 else @unlink(static::$ttl_dir.static::normalize_key($key));
54 public static function set($key, $val,$ttl = 0){ argument
55 …if (MEMCACHE_CHECK_KEYS && !is_string($key)) trigger_error("The key needs to be string! (note: not…
56 …if ($result = (@file_put_contents(static::$cache_dir.static::normalize_key($key),gzcompress(serial…
57 if ($ttl > 0) file_put_contents(static::$ttl_dir.static::normalize_key($key),time()+$ttl);
58 else @unlink(static::$ttl_dir.static::normalize_key($key));
63 public static function exists($key){ argument
64 …if (MEMCACHE_CHECK_KEYS && !is_string($key)) trigger_error("The key needs to be string! (note: not…
65 return file_exists(static::$cache_dir.static::normalize_key($key));
68 public static function del($key){ argument
69 …if (MEMCACHE_CHECK_KEYS && !is_string($key)) trigger_error("The key needs to be string! (note: not…
70 @unlink(static::$ttl_dir.static::normalize_key($key));
71 return @unlink(static::$cache_dir.static::normalize_key($key));
74 public static function get($key,&$success = false){ argument
75 …if (MEMCACHE_CHECK_KEYS && !is_string($key)) trigger_error("The key needs to be string! (note: not…
78 …file_exists(static::$cache_dir.static::normalize_key($key)) // file exists? (if not, abort…
79 …&& ($cnt = file_get_contents(static::$cache_dir.static::normalize_key($key))) !== false // file c…