@@ -49,57 +49,57 @@ This also hides the profile from Plone's {guilabel}`Add-ons` control panel.
4949Here is an example from this package:
5050
5151``` xml
52- <genericsetup : registerProfile
53- name =" with-caching-proxy"
54- title =" With caching proxy"
55- description =" Settings useful for setups with a caching proxy such as Squid or Varnish"
56- directory =" profiles/with-caching-proxy"
57- provides =" Products.GenericSetup.interfaces.EXTENSION"
58- for =" plone.app.caching.interfaces.ICacheProfiles"
59- />
52+ <genericsetup : registerProfile
53+ name =" with-caching-proxy"
54+ title =" With caching proxy"
55+ description =" Settings useful for setups with a caching proxy such as Squid or Varnish"
56+ directory =" profiles/with-caching-proxy"
57+ provides =" Products.GenericSetup.interfaces.EXTENSION"
58+ for =" plone.app.caching.interfaces.ICacheProfiles"
59+ />
6060```
6161
6262The directory ` profiles/with-caching-proxy ` contains a single import step, ` registry.xml ` , containing settings to configure the ruleset to operation mapping, and setting options for various operations.
6363
6464At the time of writing, this includes:
6565
6666``` xml
67- <record name =" plone.caching.interfaces.ICacheSettings.operationMapping" >
68- <value purge =" False" >
69- <element key =" plone.resource" >plone.app.caching.strongCaching</element >
70- <element key =" plone.stableResource" >plone.app.caching.strongCaching</element >
71- <element key =" plone.content.itemView" >plone.app.caching.weakCaching</element >
72- <element key =" plone.content.feed" >plone.app.caching.moderateCaching</element >
73- <element key =" plone.content.folderView" >plone.app.caching.weakCaching</element >
74- <element key =" plone.content.file" >plone.app.caching.moderateCaching</element >
75- <element key =" plone.content.dynamic" >plone.app.caching.terseCaching</element >
76- </value >
77- </record >
67+ <record name =" plone.caching.interfaces.ICacheSettings.operationMapping" >
68+ <value purge =" False" >
69+ <element key =" plone.resource" >plone.app.caching.strongCaching</element >
70+ <element key =" plone.stableResource" >plone.app.caching.strongCaching</element >
71+ <element key =" plone.content.itemView" >plone.app.caching.weakCaching</element >
72+ <element key =" plone.content.feed" >plone.app.caching.moderateCaching</element >
73+ <element key =" plone.content.folderView" >plone.app.caching.weakCaching</element >
74+ <element key =" plone.content.file" >plone.app.caching.moderateCaching</element >
75+ <element key =" plone.content.dynamic" >plone.app.caching.terseCaching</element >
76+ </value >
77+ </record >
7878```
7979
8080Default options for the various standard operations are found in the ` registry.xml ` file that is part of the standard installation profile for this product, in the directory ` profiles/default ` .
8181
8282The custom profile overrides a number of operation settings for specific {doc}` rulesets <rulesets-and-caching-operations> ` , as shown below.
8383
8484``` xml
85- <record name =" plone.app.caching.weakCaching.plone.content.itemView.ramCache" >
86- <field ref =" plone.app.caching.weakCaching.ramCache" />
87- <value >True</value >
88- </record >
85+ <record name =" plone.app.caching.weakCaching.plone.content.itemView.ramCache" >
86+ <field ref =" plone.app.caching.weakCaching.ramCache" />
87+ <value >True</value >
88+ </record >
8989```
9090
9191This enables RAM caching for the "weak caching" operation for resources using the ruleset ` plone.content.itemView ` .
9292The default is defined in the main ` registry.xml ` as shown below.
9393
9494``` xml
95- <record name =" plone.app.caching.weakCaching.ramCache" >
96- <field type =" plone.registry.field.Bool" >
97- <title >RAM cache</title >
98- <description >Turn on caching in Zope memory</description >
99- <required >False</required >
100- </field >
101- <value >False</value >
102- </record >
95+ <record name =" plone.app.caching.weakCaching.ramCache" >
96+ <field type =" plone.registry.field.Bool" >
97+ <title >RAM cache</title >
98+ <description >Turn on caching in Zope memory</description >
99+ <required >False</required >
100+ </field >
101+ <value >False</value >
102+ </record >
103103```
104104
105105Notice how we use a _ field reference_ to avoid having to re-define the field.
0 commit comments