开发者

Cache tags with Ehcache

开发者 https://www.devze.com 2023-01-18 15:22 出处:网络
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

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 ...

0

精彩评论

暂无评论...
验证码 换一张
取 消