Open Journal Systems  2.4.4
 All Classes Namespaces Functions Variables Groups Pages
FileCache Class Reference
Inheritance diagram for FileCache:
GenericCache

Public Member Functions

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

Public Attributes

 $cache
 
 $filename
 
- Public Attributes inherited from GenericCache
 $cacheId
 
 $context
 
 $fallback
 

Detailed Description

Provides caching based on machine-generated PHP code on the filesystem.

Definition at line 23 of file FileCache.inc.php.

Member Function Documentation

FileCache::FileCache (   $context,
  $cacheId,
  $fallback,
  $path 
)

Instantiate a cache.

Definition at line 37 of file FileCache.inc.php.

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

FileCache::flush ( )

Flush the cache

Definition at line 53 of file FileCache.inc.php.

Referenced by setCache().

FileCache::getCache (   $id)

Get an object from the cache.

Parameters
$id

Definition at line 65 of file FileCache.inc.php.

FileCache::getCacheTime ( )

Get the time at which the data was cached. If the file does not exist or an error occurs, null is returned.

Returns
int

Definition at line 106 of file FileCache.inc.php.

& FileCache::getContents ( )

Get the entire contents of the cache in an associative array.

Definition at line 116 of file FileCache.inc.php.

References $cache.

FileCache::setCache (   $id,
  $value 
)

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

Parameters
$id
$value

Definition at line 76 of file FileCache.inc.php.

References flush().

FileCache::setEntireCache ( $contents)

Set the entire contents of the cache.

Definition at line 84 of file FileCache.inc.php.

References Config\getVar().

Member Data Documentation

FileCache::$cache

The cached data

Definition at line 32 of file FileCache.inc.php.

Referenced by getContents().

FileCache::$filename

Connection to use for caching.

Definition at line 27 of file FileCache.inc.php.


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