Go to the source code of this file.
_elgg_is_cache_symlinked |
( |
| ) |
|
Checks if /cache directory has been symlinked to views simplecache directory.
- Returns
- bool
Definition at line 226 of file cache.php.
Symlinks /cache directory to views simplecache directory.
- Returns
- bool
Definition at line 244 of file cache.php.
Clear all the registered caches.
- Returns
- void
- Since
- 3.3
Definition at line 198 of file cache.php.
elgg_delete_system_cache |
( |
|
$type | ) |
|
Deletes the contents of a system cache.
- Parameters
-
string | $type | The type of cache to delete |
- Returns
- bool
- Since
- 3.0
Definition at line 56 of file cache.php.
elgg_disable_simplecache |
( |
| ) |
|
elgg_disable_system_cache |
( |
| ) |
|
Disables the system disk cache.
Uses the 'system_cache_enabled' config with a boolean value. Resets the system cache.
- Returns
- void
Definition at line 90 of file cache.php.
elgg_enable_simplecache |
( |
| ) |
|
elgg_enable_system_cache |
( |
| ) |
|
Enables the system disk cache.
Uses the 'system_cache_enabled' config with a boolean value. Resets the system cache.
- Returns
- void
Definition at line 78 of file cache.php.
elgg_get_simplecache_url |
( |
|
$view, |
|
|
|
$subview = '' |
|
) |
| |
Get the URL for the cached view.
Recommended usage is to just pass the entire view name as the first and only arg:
1 $blog_js = elgg_get_simplecache_url('elgg/blog/save_draft.js');
2 $favicon = elgg_get_simplecache_url('favicon.ico');
For backwards compatibility with older versions of Elgg, this function supports "js" or "css" as the first arg, with the rest of the view name as the second arg:
1 $blog_js = elgg_get_simplecache_url('js', 'elgg/blog/save_draft.js');
This automatically registers the view with Elgg's simplecache.
- Parameters
-
string | $view | The full view name |
string | $subview | If the first arg is "css" or "js", the rest of the view name |
- Returns
- string
- Since
- 1.8.0
- Examples:
- /root/Elgg/engine/lib/views.php.
Definition at line 139 of file cache.php.
elgg_get_system_cache |
( |
| ) |
|
Elgg cache Cache file interface for caching data.
Returns an object suitable for caching system information
- Returns
- ElggCache
Definition at line 12 of file cache.php.
elgg_invalidate_caches |
( |
| ) |
|
Invalidate all the registered caches.
- Returns
- void
- Since
- 3.3
Definition at line 183 of file cache.php.
elgg_is_simplecache_enabled |
( |
| ) |
|
elgg_is_system_cache_enabled |
( |
| ) |
|
Is system cache enabled.
- Returns
- bool
- Since
- 2.2.0
Definition at line 66 of file cache.php.
elgg_load_system_cache |
( |
|
$type | ) |
|
Retrieve the contents of a system cache.
- Parameters
-
string | $type | The type of cache to load |
- Returns
- mixed null if key not found in cache
Definition at line 45 of file cache.php.
Purge all the registered caches.
This will remove all old/stale items from the caches
- Returns
- void
- Since
- 3.3
Definition at line 213 of file cache.php.
elgg_register_simplecache_view |
( |
|
$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.
- Warning
- Simple cached views must take no parameters and return the same content no matter who is logged in.
- Parameters
-
string | $view_name | View name |
- Returns
- void
- See also
- elgg_get_simplecache_url()
- Since
- 1.8.0
- Examples:
- /root/Elgg/engine/lib/views.php.
Definition at line 111 of file cache.php.
elgg_reset_system_cache |
( |
| ) |
|
Reset the system cache by deleting the caches.
- Returns
- void
Definition at line 21 of file cache.php.
elgg_save_system_cache |
( |
|
$type, |
|
|
|
$data, |
|
|
int |
$expire_after = null |
|
) |
| |
Saves a system cache.
- Parameters
-
string | $type | The type or identifier of the cache |
mixed | $data | The data to be saved |
int | $expire_after | Number of seconds to expire the cache after |
- Returns
- bool
Definition at line 34 of file cache.php.