• Bug
  • Status: Closed
  • 2 Major
  • Resolution: Fixed
  • ehcache-web
  • lorban
  • Reporter: mkaufman
  • December 18, 2009
  • 0
  • Watchers: 0
  • July 27, 2012
  • March 16, 2010


As of 2.0.0, Ehcache Web’s SimplePageFragmentCachingFilter overrides getCacheName so that it returns its NAME constant of “SimplePageFragmentCachingFilter”, regardless of any “cacheName” init-parameter.

It ought to instead honor the “cacheName” init-parameter if one is present, e.g. as is done in SimplePageCachingFilter.

Note that http://ehcache.org/documentation/web_caching.html describes SimplePageFragmentCachingFilter as doing “everything that SimplePageCachingFilter does, except it never gzips”; and does show a “cacheName” init-parameter in its example (albeit with the default value).

Alternatively, if SimplePageFragmentCachingFilter isn’t going to accept a non-default “cacheName” value, it ought to give an error message if one is supplied rather than just ignoring the specified value.

For background (and related issues - e.g. poor error handling if the relevant cache doesn’t exist), see http://forums.terracotta.org/forums/posts/list/2868.page


Ludovic Orban 2010-03-16

fixed, SimplePageFragmentCachingFilter now uses the configured cacheName parameter.

A meaningful exception is now thrown when a cache is not found.