CacheNames.java 994 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. package com.ruoyi.common.constant;
  2. /**
  3. * 缓存组名称常量
  4. * <p>
  5. * key 格式为 cacheNames#ttl#maxIdleTime#maxSize
  6. * <p>
  7. * ttl 过期时间 如果设置为0则不过期 默认为0
  8. * maxIdleTime 最大空闲时间 根据LRU算法清理空闲数据 如果设置为0则不检测 默认为0
  9. * maxSize 组最大长度 根据LRU算法清理溢出数据 如果设置为0则无限长 默认为0
  10. * <p>
  11. * 例子: test#60s、test#0#60s、test#0#1m#1000、test#1h#0#500
  12. *
  13. * @author Lion Li
  14. */
  15. public interface CacheNames {
  16. /**
  17. * 演示案例
  18. */
  19. String DEMO_CACHE = "demo:cache#60s#10m#20";
  20. /**
  21. * 系统配置
  22. */
  23. String SYS_CONFIG = "sys_config";
  24. /**
  25. * 数据字典
  26. */
  27. String SYS_DICT = "sys_dict";
  28. /**
  29. * OSS内容
  30. */
  31. String SYS_OSS = "sys_oss#30d";
  32. /**
  33. * OSS配置
  34. */
  35. String SYS_OSS_CONFIG = "sys_oss_config";
  36. /**
  37. * 在线用户
  38. */
  39. String ONLINE_TOKEN = "online_tokens";
  40. }