Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: + MTE-117, new subsection

...

Code Block
${ctx.response.setHeader("Cache-Control", "no-cache")}

Setting cache attributes in code

...

In page properties dialog

Since the release of Magnolia 6.2.2, the basic page template in the Magnolia Templating Kit (MTK) allows you to control page caching through the No Cache checkbox in the Page properties dialog (the Meta Data tab):

Image Added

The checkbox is defined using the noCache field in the basic.yaml template definition file. If checked, the htmlHeader.ftl area template script sets the header.

Setting cache attributes in code

...

In memory threshold

This threshold is used to determine if a resource should be cached or not according to its size.  The default value of 500K was not selected randomly, but as a result of testing that shown 98% of resources were served as fast from memory as from the repo when exceeding this value. This is mainly due to the fact that transport of such amount of data offsets time needed for accessing the repository. 

...