2010-10-05 68 views
1

緩存標籤我有兩個功能:第一用的Ehcache

public String doA(Integer userId, String someValue) 

,我想緩存(同時考慮到功能帳戶參數),和第二

public String doB(Integer userId) 

應該下降的函數高速緩存「 doA「爲當前userId。

Ehcache是​​否支持類似memcached tags或其他任何可以幫助我的東西?或者可能有人知道我可以如何使用ehcache annotations解決我的問題?

回答

1

Ehcache註釋應該做的伎倆。

Ehcache註釋讓你(實際上需要你)聲明哪個緩存適用於每種方法。

As I recently discovered ...