12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- package com.ruoyi.common.constant;
- /**
- * 缓存组名称常量
- * <p>
- * key 格式为 cacheNames#ttl#maxIdleTime#maxSize
- * <p>
- * ttl 过期时间 如果设置为0则不过期 默认为0
- * maxIdleTime 最大空闲时间 根据LRU算法清理空闲数据 如果设置为0则不检测 默认为0
- * maxSize 组最大长度 根据LRU算法清理溢出数据 如果设置为0则无限长 默认为0
- * <p>
- * 例子: test#60s、test#0#60s、test#0#1m#1000、test#1h#0#500
- *
- * @author Lion Li
- */
- public interface CacheNames {
- /**
- * 演示案例
- */
- String DEMO_CACHE = "demo:cache#60s#10m#20";
- /**
- * 系统配置
- */
- String SYS_CONFIG = "sys_config";
- /**
- * 数据字典
- */
- String SYS_DICT = "sys_dict";
- /**
- * 用户账户
- */
- String SYS_USER_NAME = "sys_user_name#30d";
- /**
- * 部门
- */
- String SYS_DEPT = "sys_dept#30d";
- /**
- * OSS内容
- */
- String SYS_OSS = "sys_oss#30d";
- /**
- * OSS配置
- */
- String SYS_OSS_CONFIG = "sys_oss_config";
- /**
- * 在线用户
- */
- String ONLINE_TOKEN = "online_tokens";
- }
|