00001 <?php
00010 class Cache_APC extends Cache
00011 {
00015 function Cache_APC()
00016 {
00017 $this->Cache();
00018 }
00019
00020 function set($key, $var, $expire=0)
00021 {
00022 $key = SITE_NAME."|$key";
00023 return apc_add($key, $var, $expire);
00024 }
00025
00026 function &get($key)
00027 {
00028 $key = SITE_NAME."|$key";
00029 $val =& apc_fetch($key);
00030 return $val;
00031 }
00032
00033 function delete($key)
00034 {
00035 $key = SITE_NAME."|$key";
00036 return apc_delete($key);
00037 }
00038
00039 function flush()
00040 {
00041 apc_clear_cache('user');
00042 }
00043
00044 function gc()
00045 {
00046
00047 }
00048
00049 function stats()
00050 {
00051 return apc_cache_info('user');
00052 }
00053 }
00054
00055 ?>