Rm old options from commandLine.inc days
[mediawiki.git] / includes / objectcache / eAccelBagOStuff.php
blob30d24e8019bd34336558df520d48e082abbdf9e8
1 <?php
3 /**
4 * This is a wrapper for eAccelerator's shared memory functions.
6 * This is basically identical to the deceased Turck MMCache version,
7 * mostly because eAccelerator is based on Turck MMCache.
9 * @ingroup Cache
11 class eAccelBagOStuff extends BagOStuff {
12 public function get( $key ) {
13 $val = eaccelerator_get( $key );
15 if ( is_string( $val ) ) {
16 $val = unserialize( $val );
19 return $val;
22 public function set( $key, $value, $exptime = 0 ) {
23 eaccelerator_put( $key, serialize( $value ), $exptime );
25 return true;
28 public function delete( $key, $time = 0 ) {
29 eaccelerator_rm( $key );
31 return true;
34 public function lock( $key, $waitTimeout = 0 ) {
35 eaccelerator_lock( $key );
37 return true;
40 public function unlock( $key ) {
41 eaccelerator_unlock( $key );
43 return true;