Joomla! Page Cache Plugin.
- Depuis
- 1.5
◆ __construct()
Constructor
- Paramètres
-
DispatcherInterface | $subject | The object to observe |
array | $config | An optional associative array of configuration settings. Recognized key values include 'name', 'group', 'params', 'language' (this list is not meant to be comprehensive). |
DocumentFactoryInterface | $documentFactory | The application's document factory |
CacheControllerFactoryInterface | $cacheControllerFactory | Cache controller factory |
Profiler | null | $profiler | The application profiler |
SiteRouter | null | $router | The frontend router |
- Depuis
- 4.2.0
Références $config, $subject, et Symfony\Contracts\Service\__construct().
◆ appStateSupportsCaching()
appStateSupportsCaching |
( |
| ) |
|
|
private |
Does the current application state allow for caching?
The following conditions must be met:
- This is the frontend application. This plugin does not apply to other applications.
- This is a GET request. This plugin does not apply to POST, PUT etc.
- There is no currently logged in user (pages might have user–specific content).
- The message queue is empty.
The first two tests are cached to make early returns possible; these conditions cannot change throughout the lifetime of the request.
The other two tests MUST NOT be cached because auto–login plugins may fire anytime within the application lifetime logging in a user and messages can be generated anytime within the application's lifetime.
- Renvoie
- boolean
- Depuis
- 4.2.0
Références null.
◆ getCacheController()
Get the cache controller
- Renvoie
- CacheController
- Depuis
- 4.2.0
Références $options.
◆ getCacheKey()
◆ getSubscribedEvents()
static getSubscribedEvents |
( |
| ) |
|
|
static |
Returns an array of CMS events this plugin will listen to and the respective handlers.
- Renvoie
- array
- Depuis
- 4.2.0
Note that onAfterRender and onAfterRespond must be the last handlers to run for this plugin to operate as expected. These handlers put pages into cache. We must make sure that a. the page SHOULD be cached and b. we are caching the complete page, as it's output to the browser.
Implémente SubscriberInterface.
Références Priority\LOW.
◆ isExcluded()
◆ onAfterRender()
onAfterRender |
( |
Event |
$event | ) |
|
After Render Event. Check whether the current page is excluded from cache.
- Paramètres
-
Event | $event | The CMS event we are handling. |
- Renvoie
- void
- Depuis
- 3.9.12
◆ onAfterRespond()
onAfterRespond |
( |
Event |
$event | ) |
|
◆ onAfterRoute()
onAfterRoute |
( |
Event |
$event | ) |
|
◆ $cache
◆ $cacheControllerFactory
◆ $documentFactory
◆ $profiler
◆ $router
La documentation de cette classe a été générée à partir du fichier suivant :