Removed false comment introduced in r86633
[lhc/web/wiklou.git] / includes / objectcache / APCBagOStuff.php
1 <?php
2
3 /**
4 * This is a wrapper for APC's shared memory functions
5 *
6 * @ingroup Cache
7 */
8 class APCBagOStuff extends BagOStuff {
9 public function get( $key ) {
10 $val = apc_fetch( $key );
11
12 if ( is_string( $val ) ) {
13 $val = unserialize( $val );
14 }
15
16 return $val;
17 }
18
19 public function set( $key, $value, $exptime = 0 ) {
20 apc_store( $key, serialize( $value ), $exptime );
21
22 return true;
23 }
24
25 public function delete( $key, $time = 0 ) {
26 apc_delete( $key );
27
28 return true;
29 }
30
31 public function keys() {
32 $info = apc_cache_info( 'user' );
33 $list = $info['cache_list'];
34 $keys = array();
35
36 foreach ( $list as $entry ) {
37 $keys[] = $entry['info'];
38 }
39
40 return $keys;
41 }
42 }
43