Cache tags with Ehcache
I have 2 functions: first
public String doA(Integer userId, String someValue)
that I want to cache (taking into account parameters of function), and second
public String doB(Integer userId)
that should drops cache of function "doA" for current userId.
Does Ehcache support something like memcached tags or anything other that can helps me? Or may be anybody knows开发者_StackOverflow中文版 how I can solve my problem using ehcache annotations?
Ehcache annotations should do the trick.
Ehcache annotations let you (in fact, require you) to declare which cache applies to each method.
As I recently discovered ...
精彩评论