Simplecache handler.
More...
Simplecache handler.
Definition at line 18 of file CacheHandler.php.
Elgg\Application\CacheHandler::getContentType |
( |
|
$view | ) |
|
Get the content type.
- Parameters
-
- Returns
- string|null
Definition at line 293 of file CacheHandler.php.
Elgg\Application\CacheHandler::getProcessedView |
( |
|
$view, |
|
|
|
$viewtype |
|
) |
| |
|
protected |
Elgg\Application\CacheHandler::getViewFileType |
( |
|
$view | ) |
|
Returns the type of output expected from the view.
- view/name.extension returns "extension" if "extension" is valid
- css/view return "css"
- js/view return "js"
- Otherwise, returns "unknown"
- Parameters
-
- Returns
- string
Definition at line 311 of file CacheHandler.php.
Handle a request for a cached view.
- Parameters
-
- Returns
- Response (unprepared)
Definition at line 87 of file CacheHandler.php.
Elgg\Application\CacheHandler::is304 |
( |
|
$etag | ) |
|
|
protected |
Send a 304 and exit() if the ETag matches the request.
- Parameters
-
- Returns
- bool
Definition at line 268 of file CacheHandler.php.
Elgg\Application\CacheHandler::isCacheableView |
( |
|
$view | ) |
|
|
protected |
Is the view cacheable.
Language views are handled specially.
- Parameters
-
- Returns
- bool
Definition at line 225 of file CacheHandler.php.
Elgg\Application\CacheHandler::parsePath |
( |
|
$path | ) |
|
Parse a request.
- Parameters
-
- Returns
- array Cache parameters (empty array if failure)
Definition at line 192 of file CacheHandler.php.
Elgg\Application\CacheHandler::renderView |
( |
|
$view, |
|
|
|
$viewtype |
|
) |
| |
|
protected |
Render a view for caching.
Language views are handled specially.
- Parameters
-
string | $view | The view name |
string | $viewtype | The viewtype |
- Returns
- string|false
Definition at line 364 of file CacheHandler.php.
Elgg\Application\CacheHandler::send403 |
( |
|
$msg = 'Cache error: bad request' | ) |
|
|
protected |
Send an error message to requestor.
- Parameters
-
string | $msg | Optional message text |
- Returns
- Response
Definition at line 392 of file CacheHandler.php.
Elgg\Application\CacheHandler::sendCacheHeaders |
( |
|
$etag, |
|
|
Response |
$response |
|
) |
| |
|
protected |
Sets cache headers.
- Parameters
-
string | $etag | ETag value |
Response | $response | the response to set the headers on |
- Returns
- void
Definition at line 242 of file CacheHandler.php.
Elgg\Application\CacheHandler::setRevalidateHeaders |
( |
|
$etag, |
|
|
Response |
$response |
|
) |
| |
|
protected |
Set revalidate cache headers.
- Parameters
-
string | $etag | ETag value |
Response | $response | the response to set the headers on |
- Returns
- void
Definition at line 256 of file CacheHandler.php.
Elgg\Application\CacheHandler::$extensions |
|
static |
bool Elgg\Application\CacheHandler::$simplecache_enabled |
|
protected |
static Elgg\Application\CacheHandler::$utf8_content_types |
|
static |
Initial value:= [
'text/css',
'text/html',
'text/javascript',
'application/json',
'image/svg+xml',
'text/xml',
]
Definition at line 45 of file CacheHandler.php.
The documentation for this class was generated from the following file: