CacheConstants.java 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. package com.qmth.exam.reserve.cache;
  2. /**
  3. * 缓存相关常量
  4. */
  5. public interface CacheConstants {
  6. /**
  7. * 某个分类缓存
  8. * $cache:category:{categoryId}
  9. */
  10. String CACHE_CATEGORY = "$cache:category:%s";
  11. /**
  12. * 某个学校缓存
  13. * $cache:org:{orgId}
  14. */
  15. String CACHE_ORG = "$cache:org:%s";
  16. /**
  17. * 当前默认的学校缓存
  18. * $cache:current_org
  19. */
  20. String CACHE_CURRENT_ORG = "$cache:current_org";
  21. /**
  22. * 当前启用的预约任务缓存
  23. * $cache:current_apply_task:{orgId}
  24. */
  25. String CACHE_CURRENT_APPLY_TASK = "$cache:current_apply_task:%s";
  26. /**
  27. * 预约任务 - 某考点的“可预约总量”的缓存
  28. * $cache:apply_total:{examSiteId}
  29. */
  30. String CACHE_APPLY_TOTAL = "$cache:apply_total:%s";
  31. /**
  32. * 预约任务 - 某考点某时段的“已预约数量”的缓存
  33. * $cache:apply_finish:{examSiteId}_{timePeriodId}
  34. */
  35. String CACHE_APPLY_FINISH = "$cache:apply_finish:%s_%s";
  36. /**
  37. * 某考生的“允许预约时段次数”的缓存
  38. * $cache:student_apply_number:{studentId}
  39. */
  40. String CACHE_STUDENT_APPLY_NUMBER = "$cache:student_apply_number:%s";
  41. /**
  42. * 某考生的“预约记录”的缓存
  43. * $cache:student_apply_record:{studentId}
  44. * hashKey:{examSiteId}_{timePeriodId}
  45. */
  46. String CACHE_STUDENT_APPLY_RECORD = "$cache:student_apply_record:%s";
  47. /**
  48. * 考生预约记录队列
  49. * $queue:student_apply_record
  50. */
  51. String QUEUE_STUDENT_APPLY_RECORD = "$queue:student_apply_record";
  52. /**
  53. * 某考生预约操作锁
  54. * $lock:student_apply:{studentId}
  55. */
  56. String LOCK_STUDENT_APPLY = "student_apply:%s";
  57. /**
  58. * 系统自动为考生预约操作锁
  59. * $lock:auto_apply
  60. */
  61. String LOCK_AUTO_APPLY = "auto_apply";
  62. /**
  63. * 自动排考
  64. * $lock:arrange_exam:{yyyyMMdd}
  65. */
  66. String LOCK_ARRANGE_EXAM = "arrange_exam:%s";
  67. }