[!!!][FEATURE] Allow individual content caching
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Documentation / Changelog / master / Feature-64200-AllowIndividualContentCaching.rst
1 ==================================================
2 Feature: #64200 - Allow individual content caching
3 ==================================================
4
5 Description
6 ===========
7
8 The ``stdWrap.cache.`` property is now available as first-class function to all
9 content objects. This skips the rendering even for content objects that evaluate
10 ``stdWrap`` after rendering (e.g. ``COA``).
11
12 Usage:
13
14 .. code-block:: typoscript
15
16 page = PAGE
17 page.10 = COA
18 page.10 {
19 cache.key = coaout
20 cache.lifetime = 60
21 #stdWrap.cache.key = coastdWrap
22 #stdWrap.cache.lifetime = 60
23 10 = TEXT
24 10 {
25 cache.key = mycurrenttimestamp
26 cache.lifetime = 60
27 data = date : U
28 strftime = %H:%M:%S
29 noTrimWrap = |10: | |
30 }
31 20 = TEXT
32 20 {
33 data = date : U
34 strftime = %H:%M:%S
35 noTrimWrap = |20: | |
36 }
37 }
38
39 The commented part is ``stdWrap.cache.`` property available since 4.7,
40 that does not stop the rendering of ``COA`` including all sub-cObjects.
41
42 Additionally, stdWrap support is added to key, lifetime and tags.
43
44
45 Impact
46 ======
47
48 If you've previously used the ``cache.`` property in your custom cObject,
49 this will now fail, because ``cache.`` is unset to avoid double caching.
50 You are encouraged to rely on the core methods for caching cObjects or
51 rename your property.
52
53 ``stdWrap.cache`` continues to exists and can be used as before. However
54 the top level ``stdWrap`` of certain cObjects (e.g. ``TEXT`` cObject)
55 will not evaluate ``cache.`` as part of ``stdWrap``, but before starting
56 the rendering of the cObject. In conjunction the storing will happen
57 after the ``stdWrap`` processing right before the content is returned.
58
59 Top level ``cache.`` will not evaluate the hook
60 ``$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['stdWrap_cacheStore']``
61 any more.