4 * Wrapper for XCache object caching functions; identical interface
9 class XCacheBagOStuff
extends BagOStuff
{
11 * Get a value from the XCache object cache
13 * @param $key String: cache key
16 public function get( $key ) {
17 $val = xcache_get( $key );
19 if ( is_string( $val ) ) {
20 $val = unserialize( $val );
27 * Store a value in the XCache object cache
29 * @param $key String: cache key
30 * @param $value Mixed: object to store
31 * @param $expire Int: expiration time
34 public function set( $key, $value, $expire = 0 ) {
35 xcache_set( $key, serialize( $value ), $expire );
40 * Remove a value from the XCache object cache
42 * @param $key String: cache key
43 * @param $time Int: not used in this implementation
46 public function delete( $key, $time = 0 ) {