package com.qmth.boot.core.cache.service;

import javax.validation.constraints.NotNull;
import java.time.Duration;

/**
 * 缓存自定义设置工具
 */
public interface CacheConfigRegistration {

    /**
     * 设置自定义缓存，按照缓存名设置写入失效时长
     *
     * @param name
     * @param expireAfterWrite
     * @return
     */
    CacheConfigRegistration setCacheConfig(@NotNull String name, @NotNull Duration expireAfterWrite);
}
