<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                **1. 工作原理** (1)由自動配置類 CacheAutoConfiguration 按照順序導入下面的緩存配置類。 ```java org.springframework.boot.autoconfigure.cache.GenericCacheConfiguration org.springframework.boot.autoconfigure.cache.JCacheCacheConfiguration org.springframework.boot.autoconfigure.cache.EhCacheCacheConfiguration org.springframework.boot.autoconfigure.cache.HazelcastCacheConfiguration org.springframework.boot.autoconfigure.cache.InfinispanCacheConfiguration org.springframework.boot.autoconfigure.cache.CouchbaseCacheConfiguration org.springframework.boot.autoconfigure.cache.RedisCacheConfiguration org.springframework.boot.autoconfigure.cache.CaffeineCacheConfiguration org.springframework.boot.autoconfigure.cache.GuavaCacheConfiguration org.springframework.boot.autoconfigure.cache.SimpleCacheConfiguration【默認】 org.springframework.boot.autoconfigure.cache.NoOpCacheConfiguration ``` (2)當沒有指定任何緩存配置類時,默認使用的是 SimpleCacheConfiguration 配置類。 (3)該配置類給容器中注冊一個 CacheManager,默認為 ConcurrentMapCacheManager。 (4)該緩存管理器獲取并創建 ConcurrentMapCache 類型的緩存組件,該組件將數據保存在ConcurrentMap 緩存中。 <br/> **2. 工作流程** 以 @Cacheable 為例。 (1)方法運行之前,先去查詢 Cache(緩存組件),按照 cacheNames 指定的名字獲取。(CacheManager先獲取相應的緩存),第一次獲取緩存如果沒有 Cache 組件會自動創建。 (2)去 Cache 中查找緩存的內容,使用一個 key,默認就是方法的參數。key是按照某種策略生成的,默認由 SimpleKeyGenerator 生成 key。 ```java SimpleKeyGenerator生成key的默認策略: 如果沒有參數;key=new SimpleKey(); 如果有一個參數:key=參數的值; 如果有多個參數:key=new SimpleKey(params); ``` (3)沒有查到緩存就調用目標方法。 (4)將目標方法返回的結果,放進緩存中。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看