簡體   English   中英

@Cacheable注釋的值和cacheName參數之間的差異

[英]Difference between value and cacheName param of @Cacheable annotation

我是@Cacheable和@CacheEvict注釋的新手,我們在Spring框架中用於緩存。 但是在研究@Cacheable使用的實現和參數時,@ Cacheable注釋的value和cacheName參數之間的區別是什么

通過查看Cacheable文檔 值,可以看到cacheNames的別名,這意味着兩者都綁定到同一個對象。

值:

@AliasFor(value="cacheNames")
public abstract java.lang.String[] value
Alias for cacheNames().
Default:
{}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM