XOOPS  2.6.0
Xoops\Core\Cache\CacheManager Class Reference

Public Member Functions

 __construct ()
 
 getCache ($name)
 

Static Public Member Functions

static createDefaultConfig ()
 

Protected Member Functions

 getDefaultPool ($originalName)
 
 getDriver ($driverName, $options)
 
 startPoolAccess ($name)
 

Protected Attributes

 $poolDefs
 
 $pools = array()
 
 $xoops
 

Static Private Member Functions

static getDefaults ()
 

Detailed Description

Definition at line 30 of file CacheManager.php.

Constructor & Destructor Documentation

Xoops\Core\Cache\CacheManager::__construct ( )

Member Function Documentation

static Xoops\Core\Cache\CacheManager::createDefaultConfig ( )
static

Create a default configuration file, used in installation

When using Windows NTFS, PHP has a maximum path length of 260 bytes. Each key level in a Stash hierarchical key corresponds to a directory, and is normalized as an md5 hash. Also, Stash uses 2 levels for its own integrity ad locking mechanisms. The full key length used in XoopCore can reach 202 charachters.

If the combined path length would excede 260, we will try and switch to SQLite driver if it is available when running on a Windows system.

Returns
void

Definition at line 107 of file CacheManager.php.

References XoopsBaseConfig\get(), and Xoops\Core\Yaml\saveWrapped().

Here is the call graph for this function:

Xoops\Core\Cache\CacheManager::getCache (   $name)

Get a cache corresponding to the specified name

Parameters
string$nameName of cache definition
Returns
Access object

Definition at line 137 of file CacheManager.php.

References $name, Xoops\Core\Cache\CacheManager\getDefaultPool(), and Xoops\Core\Cache\CacheManager\startPoolAccess().

Here is the call graph for this function:

Xoops\Core\Cache\CacheManager::getDefaultPool (   $originalName)
protected

Get an Access object based on the default pool. If it isn't set, create it. If no definition exists for default, use Stash default (Ephimeral.)

Parameters
string$originalNameoriginally requested pool configuration name
Returns
Access object

Definition at line 222 of file CacheManager.php.

References $name, and Xoops\Core\Cache\CacheManager\startPoolAccess().

Referenced by Xoops\Core\Cache\CacheManager\getCache().

Here is the call graph for this function:

Here is the caller graph for this function:

static Xoops\Core\Cache\CacheManager::getDefaults ( )
staticprivate

getDefaults get default cache configuration used if there is no config file

Returns
array cache configuration

Definition at line 76 of file CacheManager.php.

References XoopsBaseConfig\get().

Referenced by Xoops\Core\Cache\CacheManager\__construct().

Here is the call graph for this function:

Here is the caller graph for this function:

Xoops\Core\Cache\CacheManager::getDriver (   $driverName,
  $options 
)
protected

getDriver

Parameters
string$driverNameshort name of the driver
array$optionsarray of options for the driver
Returns
DriverInterface|false driver object or false if it could not be instantiated

Definition at line 201 of file CacheManager.php.

References $options, and Xoops\Core\Cache\DriverList\getDriverClass().

Referenced by Xoops\Core\Cache\CacheManager\startPoolAccess().

Here is the call graph for this function:

Here is the caller graph for this function:

Xoops\Core\Cache\CacheManager::startPoolAccess (   $name)
protected

Instantiate an Access object from named configuration, including instantiating pool and driver

Parameters
string$namename of pool configuration to start
Returns
Access|false pool or false if a pool cannot be created

Definition at line 162 of file CacheManager.php.

References $name, $options, and Xoops\Core\Cache\CacheManager\getDriver().

Referenced by Xoops\Core\Cache\CacheManager\getCache(), and Xoops\Core\Cache\CacheManager\getDefaultPool().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

Xoops\Core\Cache\CacheManager::$poolDefs
protected
Initial value:
= array(
)

Definition at line 44 of file CacheManager.php.

Referenced by Xoops\Core\Cache\CacheManager\__construct().

Xoops\Core\Cache\CacheManager::$pools = array()
protected

Definition at line 37 of file CacheManager.php.

Xoops\Core\Cache\CacheManager::$xoops
protected

Definition at line 52 of file CacheManager.php.


The documentation for this class was generated from the following file: