From f38f9f97fc55855930b19b64715c78ab964846af Mon Sep 17 00:00:00 2001 From: Tymoteusz Motylewski <t.motylewski@gmail.com> Date: Fri, 27 Sep 2019 17:31:03 +0200 Subject: [PATCH] [BUGFIX] Add cache property to TypoScript syntax in t3editor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added cache type definition Releases: master, 9.5 Resolves: #89340 Change-Id: I05634dc0e9ef22ad9764635965c197f494d3a14b Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61853 Tested-by: TYPO3com <noreply@typo3.com> Tested-by: Benni Mack <benni@typo3.org> Tested-by: Björn Jacob <bjoern.jacob@tritum.de> Tested-by: Georg Ringer <georg.ringer@gmail.com> Reviewed-by: Benni Mack <benni@typo3.org> Reviewed-by: Björn Jacob <bjoern.jacob@tritum.de> Reviewed-by: Georg Ringer <georg.ringer@gmail.com> --- .../t3editor/Resources/Private/tsref.xml | 158 ++++++++++++++++++ 1 file changed, 158 insertions(+) diff --git a/typo3/sysext/t3editor/Resources/Private/tsref.xml b/typo3/sysext/t3editor/Resources/Private/tsref.xml index a25960a868d8..8e4cb1ba1548 100644 --- a/typo3/sysext/t3editor/Resources/Private/tsref.xml +++ b/typo3/sysext/t3editor/Resources/Private/tsref.xml @@ -90,6 +90,13 @@ This property is used only in some cases where CARRAY is used. Please look out f <description><![CDATA[The default object, if not defined, nothing is returned in the default case. ]]></description> </property> + <property name="cache" type="cache"> + <description><![CDATA[ + Stores the rendered content into the caching framework and reads it from there. + This allows you to reuse this content without prior rendering. The presence of cache.key will trigger this feature. +]]></description> + <default><![CDATA[0]]></default> + </property> <property name="if" type="if"> <description><![CDATA[if "if" returns false nothing is returned @@ -152,8 +159,22 @@ helloWorld.value = this item will be returned </property> </type> <type id="COA" extends="COBJ_ARRAY"> + <property name="cache" type="cache"> + <description><![CDATA[ + Stores the rendered content into the caching framework and reads it from there. + This allows you to reuse this content without prior rendering. The presence of cache.key will trigger this feature. +]]></description> + <default><![CDATA[0]]></default> + </property> </type> <type id="COA_INT" extends="COBJ_ARRAY"> + <property name="cache" type="cache"> + <description><![CDATA[ + Stores the rendered content into the caching framework and reads it from there. + This allows you to reuse this content without prior rendering. The presence of cache.key will trigger this feature. +]]></description> + <default><![CDATA[0]]></default> + </property> </type> <type id="CONFIG"> <property name="ATagParams" type="string"> @@ -733,6 +754,13 @@ Any other string is used as the XML prologue itself.]]></description> ]]></description> <default><![CDATA[< [tablename]]]></default> </property> + <property name="cache" type="cache"> + <description><![CDATA[ + Stores the rendered content into the caching framework and reads it from there. + This allows you to reuse this content without prior rendering. The presence of cache.key will trigger this feature. +]]></description> + <default><![CDATA[0]]></default> + </property> <property name="select" type="select"> <description><![CDATA[The SQL-statement is set here!]]></description> <default><![CDATA[ @@ -770,6 +798,31 @@ NOTE: Only tables allowed are "pages" or tables prefixed with one of these: "tt_ <description><![CDATA[wrap/stdWrap Wrap the whole content-story...]]></description> <default><![CDATA[ +]]></default> + </property> + </type> + <type id="cache"> + <property name="key" type="stdWrap"> + <description><![CDATA[ string / stdwrap + The cache identifier that is used to store the rendered content into the cache and to read it from there. +]]></description> + <default><![CDATA[ +]]></default> + </property> + <property name="lifetime" type="stdWrap"> + <description><![CDATA["unlimited"/"default"/integer/stdWrap + Lifetime of the content within the cache. Allows you to determine the lifetime of the cached object. This does not depend on the lifetime of the cached version of the page on which it is used. + Possible values are any positive integer and the keywords "unlimited" and "default". +]]></description> + <default><![CDATA[ +]]></default> + </property> + <property name="tags" type="stdWrap"> + <description><![CDATA[boolean/stdWrap + Can hold a comma-separated list of tags. These tags will be attached to the entry within cache_hash + cache (but not to cache_pages cache) and can be used to purge the cached content. +]]></description> + <default><![CDATA[ ]]></default> </property> </type> @@ -810,6 +863,13 @@ toolbar,edit,new,delete,move,hide <default><![CDATA[ ]]></default> </property> + <property name="cache" type="cache"> + <description><![CDATA[ + Stores the rendered content into the caching framework and reads it from there. + This allows you to reuse this content without prior rendering. The presence of cache.key will trigger this feature. +]]></description> + <default><![CDATA[0]]></default> + </property> <property name="innerWrap" type="wrap"> <description><![CDATA[Wraps the edit panel]]></description> <default><![CDATA[ @@ -904,6 +964,13 @@ If no alttext is specified, it will use an empty alttext]]></description> <default><![CDATA[useAlt ]]></default> </property> + <property name="cache" type="cache"> + <description><![CDATA[ + Stores the rendered content into the caching framework and reads it from there. + This allows you to reuse this content without prior rendering. The presence of cache.key will trigger this feature. +]]></description> + <default><![CDATA[0]]></default> + </property> <property name="file" type="stdWrap"> <description><![CDATA[resource/stdWrap If the resource is jpg,gif,jpeg,png the image is inserted as an image-tag. Al other formats is read and inserted into the HTML-code. @@ -946,6 +1013,13 @@ The maximum filesize of documents to be read is set to 1024 kb internally!]]></d See further documentation of these sub-properties in the table below.]]></description> <default><![CDATA[]]></default> </property> + <property name="cache" type="cache"> + <description><![CDATA[ + Stores the rendered content into the caching framework and reads it from there. + This allows you to reuse this content without prior rendering. The presence of cache.key will trigger this feature. +]]></description> + <default><![CDATA[0]]></default> + </property> <property name="files" type="stdWrap"> <description><![CDATA[string/stdWrap Comma-separated list of sys_file UIDs, which are loaded into the FILES object.]]></description> @@ -1005,6 +1079,13 @@ Use this property to define a content object, which should be used as template f The fluid template file. It is an alternative to ".template" and is used only, if ".template" is not set.]]></description> <default><![CDATA[]]></default> </property> + <property name="cache" type="cache"> + <description><![CDATA[ + Stores the rendered content into the caching framework and reads it from there. + This allows you to reuse this content without prior rendering. The presence of cache.key will trigger this feature. +]]></description> + <default><![CDATA[0]]></default> + </property> <property name="templateRootPaths" type="array"> <description><![CDATA[array of file paths with stdWrap Used to define several paths for templates, which will be tried in reversed order (the paths are searched from bottom to top). The first folder where the desired layout is found, is used. If the array keys are numeric, they are first sorted and then tried in reversed order. @@ -2125,6 +2206,13 @@ Notice: Affects all sub menus as well. (See "minItems" for notice)]]></descripti <default><![CDATA[ ]]></default> </property> + <property name="cache" type="cache"> + <description><![CDATA[ + Stores the rendered content into the caching framework and reads it from there. + This allows you to reuse this content without prior rendering. The presence of cache.key will trigger this feature. +]]></description> + <default><![CDATA[0]]></default> + </property> <property name="entryLevel" type="int"> <description><![CDATA[Defines at which level in the rootLine, the menu should start. Default is "0" which gives us a menu of the very first pages on the site. @@ -3223,6 +3311,13 @@ Example: <default><![CDATA[useAlt ]]></default> </property> + <property name="cache" type="cache"> + <description><![CDATA[ + Stores the rendered content into the caching framework and reads it from there. + This allows you to reuse this content without prior rendering. The presence of cache.key will trigger this feature. +]]></description> + <default><![CDATA[0]]></default> + </property> <property name="file" type="imgResource"> <description><![CDATA[ ]]></description> @@ -3279,6 +3374,13 @@ Additional Note: ONLY active if linkWrap is NOT set and file is NOT GIFBUILDER ( </property> </type> <type id="IMG_RESOURCE"> + <property name="cache" type="cache"> + <description><![CDATA[ + Stores the rendered content into the caching framework and reads it from there. + This allows you to reuse this content without prior rendering. The presence of cache.key will trigger this feature. +]]></description> + <default><![CDATA[0]]></default> + </property> <property name="file" type="imgResource"> <description><![CDATA[ ]]></description> <default><![CDATA[]]></default> @@ -3592,6 +3694,13 @@ page.27 { <default><![CDATA[ ]]></default> </property> + <property name="cache" type="cache"> + <description><![CDATA[ + Stores the rendered content into the caching framework and reads it from there. + This allows you to reuse this content without prior rendering. The presence of cache.key will trigger this feature. +]]></description> + <default><![CDATA[0]]></default> + </property> </type> <type id="META" extends="array"> <property name="REFRESH" type="stdWrap"> @@ -3664,6 +3773,13 @@ An empty string will remove the parameter from the embed-tag]]></description> </property> </type> <type id="RECORDS"> + <property name="cache" type="cache"> + <description><![CDATA[ + Stores the rendered content into the caching framework and reads it from there. + This allows you to reuse this content without prior rendering. The presence of cache.key will trigger this feature. +]]></description> + <default><![CDATA[0]]></default> + </property> <property name="conf" type="array"> <description><![CDATA[Config-array which renders records from table tablename]]></description> <default><![CDATA[If this is NOT defined, the rendering of the records is done with the toplevel-object [tablename] - just like the cObject, CONTENT!]]></default> @@ -3800,6 +3916,13 @@ uid]]></description> </property> </type> <type id="TEMPLATE"> + <property name="cache" type="cache"> + <description><![CDATA[ + Stores the rendered content into the caching framework and reads it from there. + This allows you to reuse this content without prior rendering. The presence of cache.key will trigger this feature. +]]></description> + <default><![CDATA[0]]></default> + </property> <property name="markerWrap" type="wrap"> <description><![CDATA[This is the wrap the markers is wrapped with. The default value is ### | ### resulting in the markers to be presented as ###[marker_key]###. Any whitespace around the wrap-items is stripped before they are set around the marker_key.]]></description> @@ -3891,6 +4014,13 @@ In this example the MYLINK subpart will be substituted by the wrap which is the </property> </type> <type id="TEXT" extends="stdWrap"> + <property name="cache" type="cache"> + <description><![CDATA[ + Stores the rendered content into the caching framework and reads it from there. + This allows you to reuse this content without prior rendering. The presence of cache.key will trigger this feature. +]]></description> + <default><![CDATA[0]]></default> + </property> <property name="value" type="stdWrap"> <description><![CDATA[text, wrap with stdWrap properties]]></description> <default><![CDATA[ @@ -3898,6 +4028,13 @@ In this example the MYLINK subpart will be substituted by the wrap which is the </property> </type> <type id="USER"> + <property name="cache" type="cache"> + <description><![CDATA[ + Stores the rendered content into the caching framework and reads it from there. + This allows you to reuse this content without prior rendering. The presence of cache.key will trigger this feature. +]]></description> + <default><![CDATA[0]]></default> + </property> <property name="userFunc" type="string"> <description><![CDATA[The name of the function. If you specify the name with a '->' in, it's interpreted as a call to a method in a class. Two parameters are sent: A content variable (which is empty in this case, but not when used from stdWrap function .postUserFunc and .preUserFunc) and the second parameter is an array with the properties of this cObject if any. @@ -3919,6 +4056,13 @@ page.30 { </property> </type> <type id="USER_INT"> + <property name="cache" type="cache"> + <description><![CDATA[ + Stores the rendered content into the caching framework and reads it from there. + This allows you to reuse this content without prior rendering. The presence of cache.key will trigger this feature. +]]></description> + <default><![CDATA[0]]></default> + </property> <property name="userFunc" type="string"> <description><![CDATA[The name of the function. If you specify the name with a '->' in, it's interpreted as a call to a method in a class. Two parameters are sent: A content variable (which is empty in this case, but not when used from stdWrap function .postUserFunc and .preUserFunc) and the second parameter is an array with the properties of this cObject if any. @@ -5281,6 +5425,13 @@ bytes.labels = " | K| M| G"]]></description> <default><![CDATA[ ]]></default> </property> + <property name="cache" type="cache"> + <description><![CDATA[ + Stores the rendered content into the caching framework and reads it from there. + This allows you to reuse this content without prior rendering. The presence of cache.key will trigger this feature. +]]></description> + <default><![CDATA[0]]></default> + </property> <property name="case" type="case"> <description><![CDATA[Converts case @@ -5835,6 +5986,13 @@ Uses utf-8 as character set for the operation.]]></description> </property> </type> <type id="SVG"> + <property name="cache" type="cache"> + <description><![CDATA[ + Stores the rendered content into the caching framework and reads it from there. + This allows you to reuse this content without prior rendering. The presence of cache.key will trigger this feature. +]]></description> + <default><![CDATA[0]]></default> + </property> <property name="width" type="stdWrap"> <description><![CDATA[int/stdWrap width of SVG -- GitLab