package com.njzscloud.common.cache.config;

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

@Getter
@Setter
@ConfigurationProperties(prefix = "cache")
public class CacheProperties {

    private FirstCacheProperties first = new FirstCacheProperties();

    private SecondCacheProperties second = new SecondCacheProperties();

    @Getter
    @Setter
    public static class FirstCacheProperties {
        private boolean enabled = true;
        private int capacity = 100000;
        private long timeout = 3600 * 24;
    }

    @Getter
    @Setter
    public static class SecondCacheProperties {
        private boolean enabled = false;
        private long timeout = 3600 * 24;
    }
}
