All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.eworkcloud.caffeine.CaffeineProperties Maven / Gradle / Ivy

There is a newer version: 2.5.8
Show newest version
package com.eworkcloud.caffeine;

import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;

@Getter
@Setter
@ConfigurationProperties(prefix = "caffeine")
public class CaffeineProperties {
    /**
     * 缓存最大容量
     * 超过就会按照LRU最近虽少使用算法来移除缓存项
     */
    private long maximumSize = -1;
    /**
     * 当缓存项在指定的时间段内没有被读或写就会被回收
     */
    private long expireAfterAccess = -1;
    /**
     * 当缓存项在指定的时间段内没有更新就会被回收
     */
    private long expireAfterWrite = -1;
    /**
     * 当缓存项上一次更新操作之后的多久会被刷新
     */
    private long refreshAfterWrite = -1;
    /**
     * 缓存容器的初始容量
     */
    private int initialCapacity = -1;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy