Welcome to the Linux community forum and interact with 2 million technical staff to enter publicfunctionset_cache ($ key, $ value, $ time0) {if ($ time0) $ timenull; if null, returnapc_store ($ key, $ value, $ time);} *** Apc cache-Get cache * is permanently cached through KE
Welcome to the Linux community forum and interact with 2 million technical staff> go to public function set_cache ($ key, $ value, $ time = 0) {if ($ time = 0) $ time = null; // return apc_store ($ key, $ value, $ time);}/*** Apc cache-Get cache * through KE
Welcome to the Linux community forum and interact with 2 million technicians>
Public function set_cache ($ key, $ value, $ time = 0 ){
If ($ time = 0) $ time = null; // permanent cache when null
Return apc_store ($ key, $ value, $ time );;
}
/**
* Apc cache-Get Cache
* Obtain cache data using the KEY
* @ Param string $ key KEY value
*/
Public function get_cache ($ key ){
Return apc_fetch ($ key );
}
/**
* Apc cache-Clear a cache
* Delete A cache from memcache
* @ Param string $ key KEY value
*/
Public function clear ($ key ){
Return apc_delete ($ key );
}
/**
* Apc cache-clear all caches
* This function is not recommended.
* @ Return
*/
Public function clear_all (){
Apc_clear_cache ('user'); // clear the user Cache
Return apc_clear_cache (); // clear Cache
}
/**
* Check whether the APC cache exists.
* @ Param string $ key KEY value
*/
Public function exists ($ key ){
Return apc_exists ($ key );
}
/**
* Field Auto-increment-used for counting
* @ Param string $ key KEY value
* @ Param int $ step the new step value
*/
Public function inc ($ key, $ step ){
Return apc_inc ($ key, (int) $ step );
}
/**
* Field Auto-subtraction-used for counting
* @ Param string $ key KEY value
* @ Param int $ step the new step value
*/
Public function dec ($ key, $ step ){
Return apc_dec ($ key, (int) $ step );
}
/**
* Return APC Cache Information
*/
Public function info (){
Return apc_cache_info ();
}
}
[1] [2]