loading table of contents...

Content Application Developer Manual / Version 2310

Table Of Contents

3.3.1 Object Type based Configuration

The object type based configuration allows you to configure default Cache-Control header by object type. The object type is the class of the model that is resolved by the handler mapping of the CAE. The configuration is type specific, but can also benefit from abstraction along the class hierarchy. That means that you may simply configure a common value for a super class instead of taking care about all the child classes. The type information part of the property name should be the simple name of the class (no package information, see Example 3.1, “Type based Cache-Control Configuration”) and in lowercase. Configuration of classes with the same name in different packages is not supported.

# Cache Control Configuration

# time to cache blobs: "forever", aka 180 days

# Fallback if nothing else specified

Example 3.1. Type based Cache-Control Configuration

If you want to omit that the Cache-Control Header is added for an object type, you can set cae.cache-control.for-type.myobject.max-age=-1s. Otherwise, the fallback configuration for cae.cache-control.for-type.object.max-age=1m would be used.

In case your request mapping resolves, for example, a combined object like an article page, consisting of a navigation and a main article, the lookup mechanism uses the type of the article first to produce a configuration match and then tries the type hierarchy of the page itself. This can be customized to project needs by defining a primary bean of type Function<Object, Stream<Type>>.

Search Results

Table Of Contents

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.