This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

AnnouncementAnnouncement Module

Collapse

No announcement yet.

Wanghy-Cache 1.0-RC1 released (AOP Caching for Spring).Page Title Module

Alex, any plans on introducing SwarmCache or some other cluster-aware caching provider?

Just a general design question.... Many of our classes are cache-state aware, in that they look at a cache and if a certain operation fails, it goes back to the authoritative DB and ignores the cache. The best example is a password. If the password appears wrong, and it was sourced from a cache, better go back to the DAO and check the user didn't change it and we simply used a stale cache element. Does Wanghy offer a solution to that? Also, is there just a general-purpose caching interface we can talk to, so existing application-specific cache interfaces (like in our case UserCache, BasicAclEntryCache and StatelessTicketCache) can be used?

Comment

Hello Ben,
For the first release of Wanghy-Cache, we currently
support two popular and well-established, cluster-aware caching
implementations, OSCache and JCS. Future releases
will undoubtedly provide support for other
implementations as demand grows, and we're looking to
the open source community to help us identify that
demand.

As of Release Candidate 1, Wanghy-Cache provides the
following features:

1. Storing the return values of methods in the
underlying cache implementation.
2. Flushing the cache when methods are executed.

To achieve what you described with the password
example, you would need to use our facade
interface and programatically provide that capability,
which should be easy enough to accomplish. This
general-purpose caching interface is
'org.wanghy.cache.provider.CacheProviderFacade', which
encapsulates the basic operations on a cache (put,
get, flush, cancelUpdate). We encourage you to give
it a try and let us know how it goes.