Class ElggFileCache
ElggFileCache Store cached data in a file store.
-
ElggCache
implements
ArrayAccess
-
ElggFileCache
Methods summary
public
|
#
__construct( string $cache_path, integer $max_age = 0, integer $max_size = 0 )
Set the Elgg cache.
Parameters
- $cache_path
string $cache_path The cache path.
- $max_age
integer $max_age Maximum age in seconds, 0 if no limit.
- $max_size
integer $max_size Maximum size of cache in seconds, 0 if no limit.
Throws
Overrides
|
protected
mixed
|
#
createFile( string $filename, string $rw = "rb" )
Create and return a handle to a file.
Create and return a handle to a file.
Parameters
- $filename
string $filename Filename to save as
- $rw
string $rw Write mode
Returns
mixed
|
protected
string
|
#
sanitizeFilename( string $filename )
Create a sanitised filename for the file.
Create a sanitised filename for the file.
Parameters
- $filename
string $filename The filename
Returns
string
|
public
boolean
|
#
save( string $key, string $data )
Save a key
Parameters
- $key
string $key Name
- $data
string $data Value
Returns
boolean
|
public
string
|
#
load( string $key, integer $offset = 0, integer $limit = null )
Load a key
Parameters
- $key
string $key Name
- $offset
integer $offset Offset
- $limit
integer $limit Limit
Returns
string
|
public
boolean
|
#
delete( string $key )
Invalidate a given key.
Parameters
Returns
boolean
|
public
|
#
clear( )
Delete all files in the directory of this file cache
Delete all files in the directory of this file cache
|
public
|
#
__destruct( )
Preform cleanup and invalidates cache upon object destruction
Preform cleanup and invalidates cache upon object destruction
Throws
|
Methods inherited from ElggCache
__get(),
__isset(),
__set(),
__unset(),
add(),
getVariable(),
offsetExists(),
offsetGet(),
offsetSet(),
offsetUnset(),
setVariable()
|