You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[DOCS] Adjust feature RST for CacheDataCollector API
The RST for the CacheDataCollector API states, that the default
lifetime of a cache tag is 86400 seconds. This is however not
true, since the default lifetime is set to PHP_INT_MAX.
@@ -19,8 +19,9 @@ The API is implemented as a new PSR-7 request attribute
:php:`'frontend.cache.collector'`, which makes this API independent from TSFE.
Every cache tag has a lifetime. The minimum lifetime is calculated
-from all given cache tags. API users don't have to deal with it individually.-The default lifetime for a cache tag is 86400 seconds (24 hours).+from all given cache tags. By default, the lifetime of a cache tag is set to+:php:`PHP_INT_MAX`, so it expires many years in the future. API users must+therefore define the lifetime of a cache tag individually.
The current TSFE API is deprecated in favor of the new API, as the
current cache tag API implementation does not allow to set lifetime and
@@ -30,13 +31,13 @@ Example
-------
.. code-block:: php
- :caption: Add a single cache tag+ :caption: Add a single cache tag with 24 hours lifetime
use TYPO3\CMS\Core\Cache\CacheTag;
$cacheDataCollector = $request->getAttribute('frontend.cache.collector');
$cacheDataCollector->addCacheTags(
- new CacheTag('tx_myextension_mytable')+ new CacheTag('tx_myextension_mytable', 86400)
);
.. code-block:: php
The text was updated successfully, but these errors were encountered:
ℹ️ View this commit on Github
👥 Authored by Torben Hansen [email protected]
✔️ Merged by Benjamin Franzke [email protected]
Commit message
[DOCS] Adjust feature RST for CacheDataCollector API
The RST for the CacheDataCollector API states, that the default
lifetime of a cache tag is 86400 seconds. This is however not
true, since the default lifetime is set to
PHP_INT_MAX
.This change adjusts the feature RST for #102422.
Resolves: #105274
Related: #102422
Releases: main
Change-Id: I8c78e4a3891ac255e4fa4d997167edb1d6de7652
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/86555
Tested-by: Benjamin Franzke [email protected]
Tested-by: core-ci [email protected]
Tested-by: Sascha Nowak [email protected]
Reviewed-by: Sascha Nowak [email protected]
Reviewed-by: Benjamin Franzke [email protected]
Tested-by: Garvin Hicking [email protected]
Reviewed-by: Garvin Hicking [email protected]
➗ Modified files
13.3/Feature-102422-CacheDataCollectorApi.rst
The text was updated successfully, but these errors were encountered: