Elgg  Version 1.11
Public Member Functions | List of all members
Elgg\Cache\SimpleCache Class Reference

Public Member Functions

 __construct ()
 Constructor. More...
 
 registerView ($view_name)
 Registers a view to simple cache. More...
 
 getUrl ($type, $view)
 
 getRoot ()
 Get the base url for simple cache requests. More...
 
 isEnabled ()
 Is simple cache enabled. More...
 
 enable ()
 Enables the simple cache. More...
 
 disable ()
 Disables the simple cache. More...
 
 invalidate ()
 Deletes all cached views in the simplecache and sets the lastcache and lastupdate time to 0 for every valid viewtype. More...
 
 init ()
 Set up $CONFIG appropriately on engine boot. More...
 

Detailed Description

Definition at line 13 of file SimpleCache.php.

Constructor & Destructor Documentation

Elgg\Cache\SimpleCache::__construct ( )

Constructor.

Examples:
/root/Elgg/engine/classes/Elgg/Cache/SimpleCache.php.

Definition at line 25 of file SimpleCache.php.

Member Function Documentation

Elgg\Cache\SimpleCache::disable ( )

Disables the simple cache.

Warning
Simplecache is also purged when disabled.
See also
elgg_register_simplecache_view()
Returns
void
Examples:
/root/Elgg/engine/classes/Elgg/Cache/SimpleCache.php.

Definition at line 123 of file SimpleCache.php.

Elgg\Cache\SimpleCache::enable ( )

Enables the simple cache.

See also
elgg_register_simplecache_view()
Returns
void
Examples:
/root/Elgg/engine/classes/Elgg/Cache/SimpleCache.php.

Definition at line 109 of file SimpleCache.php.

Elgg\Cache\SimpleCache::getRoot ( )

Get the base url for simple cache requests.

Returns
string The simplecache root url for the current viewtype. private
Examples:
/root/Elgg/engine/classes/Elgg/Cache/SimpleCache.php.

Definition at line 82 of file SimpleCache.php.

Elgg\Cache\SimpleCache::getUrl (   $type,
  $view 
)
Elgg\Cache\SimpleCache::init ( )

Set up $CONFIG appropriately on engine boot.

Returns
void
Examples:
/root/Elgg/engine/classes/Elgg/Cache/SimpleCache.php.

Definition at line 161 of file SimpleCache.php.

Elgg\Cache\SimpleCache::invalidate ( )

Deletes all cached views in the simplecache and sets the lastcache and lastupdate time to 0 for every valid viewtype.

Returns
bool
Examples:
/root/Elgg/engine/classes/Elgg/Cache/SimpleCache.php.

Definition at line 139 of file SimpleCache.php.

Elgg\Cache\SimpleCache::isEnabled ( )

Is simple cache enabled.

Returns
bool
Examples:
/root/Elgg/engine/classes/Elgg/Cache/SimpleCache.php.

Definition at line 99 of file SimpleCache.php.

Elgg\Cache\SimpleCache::registerView (   $view_name)

Registers a view to simple cache.

Simple cache is a caching mechanism that saves the output of a view and its extensions into a file. If the view is called by the engine/handlers/cache_handler.php file, the Elgg engine will not be loaded and the contents of the view will returned from file.

Warning
Simple cached views must take no parameters and return the same content no matter who is logged in.
Parameters
string$view_nameView name
Returns
void
See also
elgg_get_simplecache_url()
Examples:
/root/Elgg/engine/classes/Elgg/Cache/SimpleCache.php.

Definition at line 47 of file SimpleCache.php.


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