原文:springboot緩存注解——@Cacheable和@CacheConfig

Caching :制定多個緩存規則 Cacheable 和 CachePut 同時標注時 , CachePut導致還是會走方法跟數據庫交互 另外: CacheConfig :抽取緩存公共配置,可以標注在類上 如: ...

2019-04-24 16:49 0 6167 推薦指數:

查看詳情

springboot緩存之@Caching和@CacheConfig注解

@Caching:用於定制復雜的緩存規則 在執行Localhost:8080/emp/lastName/jack請求之后,會同時將@CachePut緩存規則加入到緩存中。 @CacheConfig(cacheNames="emp")用於標注在類上,可以存放該類中所有緩存的公有屬性 ...

Mon Feb 10 23:39:00 CST 2020 0 6862
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM