Skip to content

GrailsEhcacheCacheManager.createDefaultCache should use defined cache-template for ehcache.xml #42

@jchharris

Description

@jchharris

When the GrailsEhcacheCacheManager cannot find the requested cache it creates a default cache with it's own defined configuration setting heap(10).

if the application's ehcache configuration has defined a cache-template, the GrailsEhcacheCacheManager should use that configuration in preference. The application should be able to define what it wants as a default configuration.

The default of 10 heap entries came as a surprise to us when our Cacheable method wasn't performing as expected. Nowhere in the documentation does it state that the plugin will default to 10 entries when an explicit config for the cache is not defined. The documentation states "By default, the only provided configuration strategy supports reading an XML file to configure Ehcache." so it is reasonable for a developer to assume that the cache-template directives in the XML will also be obeyed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions