ismorodin / ehcache-spring-annotations

Automatically exported from code.google.com/p/ehcache-spring-annotations
0 stars 0 forks source link

construct a sensible mechanism to invoke Ehcache#evictExpiredElements() #11

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
May or may not be in scope for this project, but:

I find myself repeatedly writing a class that takes a reference to the
CacheManager and exposes one method. This method iterates through the
Ehcache instances in the CacheManager, invoking evictExpiredElements() on
each one.
Periodic invocation of this method is configured in the application's
Spring configuration.

It would be very useful to construct a component that would execute this
same logic and could be optionally enabled/disabled.

Original issue reported on code.google.com by nicholas.blair on 14 Apr 2010 at 7:59

GoogleCodeExporter commented 9 years ago
Perhaps we could add some new XSD elements:
{{{
<ehcache:config>
    <ehcache:clear-expired interval="">
        <ehcache:include name="" pattern=""/>
        <ehcache:exclude name="" pattern=""/>
    </ehcache:clear-expired>
</ehcache:config>
}}}

Then namespace handler could wire up the appropriate background-task beans to 
take
care of the expiration.

Original comment by eric.dalquist on 14 Apr 2010 at 8:35

GoogleCodeExporter commented 9 years ago
Note that I meant the name and pattern attributes on the include/exclude 
elements to
be mutually exclusive.

Original comment by eric.dalquist on 14 Apr 2010 at 8:38

GoogleCodeExporter commented 9 years ago
I like the proposed syntax. Since we need new elements in the schema, I'm going 
to
create a 1.1 schema.

Original comment by nicholas.blair on 14 Apr 2010 at 9:04

GoogleCodeExporter commented 9 years ago
Initial implementation available on trunk.

Original comment by nicholas.blair on 17 May 2010 at 7:29