AddCacheTagEvent
Read onlyYes
FinalYes
This event should only be used in code that has no access to the request attribute 'frontend.cache.collector'.
If you have access to the request, use the $request->getAttribute('frontend.cache.collector')->addCacheTags(...) directly. It's really just there to allow passive cache-data signaling, without exactly knowing the current context.
This event is a tribute to core places that need to set cache tags but do not have the current request yet. The FE CacheDataCollectorAttribute listens on this event. It may vanish later without further notice.
Table of Contents
Properties
Methods
- __construct() : mixed
Properties
$cacheTag
public
CacheTag
$cacheTag
Methods
__construct()
public
__construct(CacheTag $cacheTag) : mixed
Parameters
- $cacheTag : CacheTag