第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Ehcache 2.10.6 命中統(tǒng)計數(shù)據(jù)未增加

Ehcache 2.10.6 命中統(tǒng)計數(shù)據(jù)未增加

我在我的一個項目中設(shè)置了一個緩存,以及自定義運行狀況指示器,如下所示:@Componentpublic class CustomHealthIndicator extends AbstractHealthIndicator{    @Override    protected void doHealthCheck(Health.Builder builder)    {        CacheManager cacheManagerInstance = CacheManager.getInstance();        Ehcache cache = cacheManagerInstance.getCache("myCache");        builder.up()                .withDetail("Cache Size", cache.getSize())                .withDetail("Cache Hit Count", cache.getStatistics().cacheHitCount())                .withDetail("Cache Miss Count", cache.getStatistics().cacheMissCount())                .withDetail("Cache Put Count", cache.getStatistics().cachePutCount())                .withDetail("Cache Remove Count", cache.getStatistics().cacheRemoveCount())                .withDetail("Cache Expired Count", cache.getStatistics().cacheExpiredCount());    }當(dāng)我在本地運行它并轉(zhuǎn)到 localhost:8080/actuator/health 時,所有其他統(tǒng)計數(shù)據(jù)都會更新,但點擊次數(shù)不會更新。{“status”:“UP”,“details”:{“緩存大小”:9,“緩存命中計數(shù)”:0,“緩存未命中計數(shù)”:9,“緩存放置計數(shù)”:9,“緩存刪除計數(shù)” :0,"緩存過期計數(shù)":0}}我在其他項目中訪問緩存的代碼是:Cacheable cachedResult = CacheManager.getInstance().getCache(request);if (cachedResult != null){    CustomResponse response = (CustomResponse) cachedResult.getObject();    return response;}我可以確認該塊已被輸入并且緩存中確實有數(shù)據(jù)。我不知道為什么點擊統(tǒng)計沒有更新。任何幫助,將不勝感激!
查看完整描述

1 回答

?
一只名叫tom的貓

TA貢獻1906條經(jīng)驗 獲得超3個贊

事實證明,我的對象沒有被正確序列化,因此當(dāng)它在緩存中搜索它們時,沒有找到它們。



查看完整回答
反對 回復(fù) 2023-10-13
  • 1 回答
  • 0 關(guān)注
  • 107 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號