Performance tuning
This chapter describes some recommended settings for improving the overall performance of WebCmsModule.
URL resolving
The mapping infrastructure (eg. @WebCmsPageMapping
) has as a drawback that any request will be matched against all registered WebCmsUrl
entries. It is strongly advised to configure the WebCmsUrlCache to cache these lookups, as well as to limit the request paths for lookup if you can do so.
By default all requests will be matched against the WebCmsUrl
collection. You can control which requests should be matched by specifying one ore more ANT path patterns in the relevant settings.
URL resolve path properties
Property |
Description |
webCmsModule.urls.included-path-patterns |
Paths to be included for |
webCmsModule.urls.excluded-path-patterns |
Paths to always be excluded from |
WARNING
If URL resolving is disabled for a particular path,
@WebCmsEndpointMapping
handler methods that use aWebCmsUrl
with that path will never match. Disable URL resolving only if you are sure you will handle all requests for these paths manually.
Caching
WebCmsModule uses some specific caches to improve performance. It is recommended to configure these caches in any production application.
WebCmsModule custom caches
Cache name |
Description |
WebCmsUrlCache |
Maps request paths to matching |
WebCmsMenuCache |
Caches the menu structure that should be generated from corresponding |
WebCmsDomainCache |
Relevant in a multi-domain setup. Caches domains and their metadata. Domain lookups happen on pratically every request so this cache is very important. Domain settings are usually quite static, so caching for a very long time is often feasible. |
Hibernate level 2 cache
To improve overall performance of the domain model, configuring Hibernate level 2 cache is also strongly advised.
The cache names for the Hibernate level 2 cache are always fully qualified class names. The prefix c.f.a.m.w.d stands for com.foreach.across.modules.webcms.domain.
Cache name |
Hints |
c.f.a.m.w.d.url.WebCmsUrl |
Holds WebCmsUrl entity data. The size of your WebCmsUrl cache should be a multiple of your WebCmsEndpoint cache and a minimum of one-to-one, as usually there are multiple urls per endpoint. |
c.f.a.m.w.d.endpoint.WebCmsEndpoint |
References WebCmsRemoteEndpoint and WebCmsAssetEndpoint. Size this cache according to the number of redirects or assets you expect to be frequently accessed. Depending on your application setup a good guideline is at least the size of your |
c.f.a.m.w.d.type.WebCmsTypeSpecifier |
The items in the |
c.f.a.m.w.d.asset.WebCmsAsset |
The size and duration of your |
c.f.a.m.w.d.domain.WebCmsDomain |
The items in your |