RedisConstants.java 882 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. package com.youlai.boot.common.constant;
  2. /**
  3. * Redis Key常量
  4. *
  5. * @author Theo
  6. * @since 2024-7-29 11:46:08
  7. */
  8. public interface RedisConstants {
  9. /**
  10. * 系统配置Redis-key
  11. */
  12. String SYSTEM_CONFIG_KEY = "system:config";
  13. /**
  14. * IP限流Redis-key
  15. */
  16. String IP_RATE_LIMITER_KEY = "ip:rate:limiter:";
  17. /**
  18. * 防重复提交Redis-key
  19. */
  20. String RESUBMIT_LOCK_PREFIX = "resubmit:lock:";
  21. /**
  22. * 单个IP请求的最大每秒查询数(QPS)阈值Key
  23. */
  24. String IP_QPS_THRESHOLD_LIMIT_KEY = "IP_QPS_THRESHOLD_LIMIT";
  25. /**
  26. * 手机验证码缓存前缀
  27. */
  28. String MOBILE_VERIFICATION_CODE_PREFIX = "VERIFICATION_CODE:MOBILE:";
  29. /**
  30. * 邮箱验证码缓存前缀
  31. */
  32. String EMAIL_VERIFICATION_CODE_PREFIX = "VERIFICATION_CODE:EMAIL:";
  33. String FOLDER_PREFIX = "FOLDER:";
  34. }