[MGNLCACHE-119] "The defaultPageCache property is not set for the cache CacheFilter, falling back to defaultPageCache." Created: 20/Jul/15  Updated: 31/Jul/15  Resolved: 29/Jul/15

Status: Closed
Project: Cache Modules
Component/s: None
Affects Version/s: 5.4
Fix Version/s: 5.4.1

Type: Bug Priority: Minor
Reporter: Nils Breunese Assignee: Evzen Fochr
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: 2.75h
Original Estimate: Not Specified

Issue Links:
Relates
relates to MGNLCACHE-117 Versionhandler of the cache module br... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Sprint: Sprint 3 (Kromeriz)

 Description   

On a Magnolia 5.4 installation with a cleanly bootstrapped cache module, we get the following log message on startup:

WARN   info.magnolia.module.cache.filter.CacheFilter 20.07.2015 14:32:42 -- The defaultPageCache property is not set for the cache CacheFilter, falling back to defaultPageCache.

This message seems to be logged by CacheFilter:119. The code in oCacheModuleStart() checks if defaultContentCachingConfigurationName is null, and apparently it is, but it seems the way to set this variable is to make sure setDefaultContentCachingConfigurationName() gets called. The obvious way to make sure that happens is via Node2Bean, which would mean having a property called defaultContentCachingConfigurationName. This property indeed doesn't exist, but the log message suggests that it's a property called defaultPageCache that's missing, which is actually not missing.

My theory is that CacheFilter.DEFAULT_CONTENT_CACHING_CONFIGURATION_NAME is used for two different things:

  • The name of the property that holds the name of the default content caching configuration
  • The name of the default content caching configuration

It probably shouldn't be used for at least one of those two. The existence of AbstractCacheModule.DEFAULT_CACHE_CONFIG suggests that the value of CacheFilter.DEFAULT_CONTENT_CACHING_CONFIGURATION should actually be "defaultContentCachingConfigurationName" instead of "defaultPageCache".



 Comments   
Comment by Roman Kovařík [ 28/Jul/15 ]

Commit: https://git.magnolia-cms.com/gitweb/?p=modules/cache.git;a=commitdiff;h=4e08d8f88f5f742c4c5f9652d77fd1747050e635

Comment by Roman Kovařík [ 28/Jul/15 ]

Reopened:

  1. info.magnolia.module.cache.setup.CacheModuleVersionHandlerTest#reconfigurationsFor54 is failing.
  2. info.magnolia.module.cache.filter.CacheFilter#onCacheModuleStart the property is named defaultContentConfigurationName, the log message is wrong.
  3. info.magnolia.module.cache.setup.CacheModuleVersionHandlerTest#testUpdateFrom54 Could you use node matchers?
    This task should be done as part of MGNLCACHE-117 so maybe it'd be better to resolve them together.
Generated at Sun Feb 11 23:52:23 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.