Open Journal Systems  3.3.0
APCCache Class Reference
Inheritance diagram for APCCache:
GenericCache

Public Member Functions

 __construct ($context, $cacheId, $fallback)
 
 flush ()
 
 getCache ($id)
 
 getCacheTime ()
 
 setCache ($id, $value)
 
 setEntireCache ($contents)
 
- Public Member Functions inherited from GenericCache
 close ()
 
 get ($id)
 
 getCacheId ()
 
 getContext ()
 
 set ($id, $value)
 

Additional Inherited Members

- Data Fields inherited from GenericCache
 $cacheId
 
 $cacheMiss
 
 $context
 
 $fallback
 

Detailed Description

Provides caching based on APC's variable store.

See also
GenericCache

Definition at line 22 of file APCCache.inc.php.

Constructor & Destructor Documentation

◆ __construct()

APCCache::__construct (   $context,
  $cacheId,
  $fallback 
)

Instantiate a cache.

Parameters
$contextstring
$cacheIdmixed
$fallbackarray PKP-style callback

Reimplemented from GenericCache.

Definition at line 29 of file APCCache.inc.php.

References GenericCache\$cacheId, GenericCache\$context, and GenericCache\$fallback.

Member Function Documentation

◆ flush()

APCCache::flush ( )

Flush the cache.

Reimplemented from GenericCache.

Definition at line 36 of file APCCache.inc.php.

References GenericCache\getCacheId(), GenericCache\getContext(), and INDEX_FILE_LOCATION.

◆ getCache()

APCCache::getCache (   $id)

Get an object from the cache.

Parameters
$idmixed
Returns
mixed

Reimplemented from GenericCache.

Definition at line 49 of file APCCache.inc.php.

References GenericCache\$cacheMiss, GenericCache\getCacheId(), GenericCache\getContext(), and INDEX_FILE_LOCATION.

◆ getCacheTime()

APCCache::getCacheTime ( )

Get the time at which the data was cached. Not implemented in this type of cache.

Returns
null

Reimplemented from GenericCache.

Definition at line 74 of file APCCache.inc.php.

◆ setCache()

APCCache::setCache (   $id,
  $value 
)

Set an object in the cache. This function should be overridden by subclasses.

Parameters
$idmixed
$valuemixed

Reimplemented from GenericCache.

Definition at line 63 of file APCCache.inc.php.

References GenericCache\getCacheId(), GenericCache\getContext(), and INDEX_FILE_LOCATION.

Referenced by setEntireCache().

◆ setEntireCache()

APCCache::setEntireCache (   $contents)

Set the entire contents of the cache. WARNING: THIS DOES NOT FLUSH THE CACHE FIRST!

Parameters
$contentsarray Complete cache contents.

Reimplemented from GenericCache.

Definition at line 83 of file APCCache.inc.php.

References setCache().


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