Currently in my project we are caching methods using ehcache and Spring cache system, however I don't know which mechanism we should use to cache components like header, footer, banners etc...
Does Hybris provides a mechanism via XML to cache these components?
By default Hybris already caches CMS components using an EhCache region called cmsCacheRegion
. You can find configuration for this bean in acceleratorcms-cache-spring.xml
This can be enabled/disabled with the property cms.cache.enabled
. If using Cloud Commerce, this property will be enabled by default on storefront nodes.
If you would like to extend the CMS component types being cached, see bean defaultCacheKeyProviders
in acceleratorcms-spring.xml
. You should mostly be covered though as there's an entry for AbstractCMSComponent
Some more information here: https://help.sap.com/viewer/4c33bf189ab9409e84e589295c36d96e/2105/en-US/8abd87cc866910149aa5e52e716d568e.html?q=acceleratorcms