Stud.IP  2.0 Revision 48548
 All Data Structures Namespaces Files Functions Variables Pages
StudipFileCache Class Reference
Inheritance diagram for StudipFileCache:
Inheritance graph
Collaboration diagram for StudipFileCache:
Collaboration graph

Public Member Functions

 __construct ($args=array())
 getCacheDir ()
 expire ($key)
 read ($key)
 write ($key, $content, $expire=43200)
 purge ($be_quiet=true)

Constructor & Destructor Documentation

__construct (   $args = array())

without the 'dir' argument the cache path is taken from $CACHING_FILECACHE_PATH or is set to $TMP_PATH/studip_cache throws exception if the directory does not exists or could not be created

Parameters
arrayuse $args['dir'] to set cache directory
Returns
void

Member Function Documentation

expire (   $key)

expire cache item

See Also
StudipCache::expire()
Parameters
string$key
Returns
void

Implements StudipCache.

Here is the caller graph for this function:

getCacheDir ( )

get path to cache directory

Returns
string
purge (   $be_quiet = true)

purges expired entries from the cache directory

Parameters
boolecho messages if set to false
Returns
int the number of deleted files
read (   $key)

retrieve cache item from filesystem tests first if item is expired

See Also
StudipCache::read()
Parameters
stringa cache key
Returns
string|bool

Implements StudipCache.

write (   $key,
  $content,
  $expire = 43200 
)

store data as cache item in filesystem

See Also
StudipCache::write()
Parameters
stringa cache key
stringdata to store
intexpiry time in seconds, default 12h
Returns
int|bool the number of bytes that were written to the file, or false on failure

Implements StudipCache.

Here is the call graph for this function:


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