You are here

function xautoload_ClassLoader_ApcCache::__construct in X Autoload 7.3

Parameters

xautoload_ClassFinder_Interface $finder: Another ClassFinder to delegate to, if the class is not in the cache.

string $prefix: A prefix for the storage key in APC.

Throws

Exception

Overrides xautoload_ClassLoader_NoCache::__construct

File

lib/ClassLoader/ApcCache.php, line 18

Class

xautoload_ClassLoader_ApcCache

Code

function __construct($finder, $prefix) {
  if (!extension_loaded('apc') || !function_exists('apc_store')) {
    throw new Exception('Unable to use xautoload_ClassLoader_ApcCache, because APC is not enabled.');
  }
  $this->prefix = $prefix;
  parent::__construct($finder);
}