Class CaffeineNeverExpire<K,V>

java.lang.Object
cn.herodotus.engine.cache.caffeine.enhance.CaffeineNeverExpire<K,V>
All Implemented Interfaces:
com.github.benmanes.caffeine.cache.Expiry<K,V>

public class CaffeineNeverExpire<K,V> extends Object implements com.github.benmanes.caffeine.cache.Expiry<K,V>

Description: Caffeine 缓存永不过期时间配置

Author:
: gengwei.zheng
Date:
: 2021/7/30 15:07
  • Constructor Details

    • CaffeineNeverExpire

      public CaffeineNeverExpire()
  • Method Details

    • expireAfterCreate

      public long expireAfterCreate(@NonNull K key, @NonNull V value, long currentTime)
      Specified by:
      expireAfterCreate in interface com.github.benmanes.caffeine.cache.Expiry<K,V>
    • expireAfterUpdate

      public long expireAfterUpdate(@NonNull K key, @NonNull V value, long currentTime, @org.checkerframework.checker.index.qual.NonNegative long currentDuration)
      Specified by:
      expireAfterUpdate in interface com.github.benmanes.caffeine.cache.Expiry<K,V>
    • expireAfterRead

      public long expireAfterRead(@NonNull K key, @NonNull V value, long currentTime, @org.checkerframework.checker.index.qual.NonNegative long currentDuration)
      Specified by:
      expireAfterRead in interface com.github.benmanes.caffeine.cache.Expiry<K,V>