It doesn't mean that it is any faster than MySQL-based object cache %)
}
}
+/**
+ * This is a wrapper for APC's shared memory functions
+ *
+ * @package MediaWiki
+ */
+
+class APCBagOStuff extends BagOStuff {
+ function get($key) {
+ $val = apc_fetch($key);
+ return (is_string($val))?$val:unserialize($val);
+ }
+
+ function set($key, $value, $exptime=0) {
+ apc_store($key, $value, $exptime);
+ return true;
+ }
+
+ function delete($key) {
+ apc_delete($key);
+ return true;
+ }
+}
+
+
/**
* This is a wrapper for eAccelerator's shared memory functions.
*
if ( function_exists( 'eaccelerator_get' ) ) {
require_once( 'BagOStuff.php' );
$wgCaches[CACHE_ACCEL] = new eAccelBagOStuff;
+ } elseif ( function_exists( 'apc_fetch') ) {
+ require_once( 'BagOStuff.php' );
+ $wgCaches[CACHE_ACCEL] = new APCBagOStuff;
} elseif ( function_exists( 'mmcache_get' ) ) {
require_once( 'BagOStuff.php' );
$wgCaches[CACHE_ACCEL] = new TurckBagOStuff;