RedisKey.java 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. package com.fdkankan.redis.constant;
  2. import java.util.concurrent.TimeUnit;
  3. public class RedisKey {
  4. /**
  5. * 过期时间:1分钟
  6. */
  7. public static final int EXPIRE_TIME_1_MINUTE = 60;
  8. /**
  9. * 过期时间:10分钟
  10. */
  11. public static final int EXPIRE_TIME_10_MINUTE = 10*60;
  12. /**
  13. * 过期时间:30分钟
  14. */
  15. public static final int EXPIRE_TIME_30_MINUTE = 30*60;
  16. /**
  17. * 过期时间:2小时
  18. */
  19. public static final int EXPIRE_TIME_2_HOUR = 2*60*60;
  20. /**
  21. * 用户过期时间
  22. */
  23. public static final int USER_EXPIRE_TIME = 6*60*60;
  24. /**
  25. * 相机登陆7天有效期
  26. */
  27. public static final int CAMERA_EXPIRE_7_TIME = 7*24*60*60;
  28. public static final String SYSTEM_PREFIX = "4dkankan";
  29. /**
  30. * 登录token
  31. */
  32. public static String TOKEN_USER = "token:type:%s:name:%s";
  33. /**
  34. * ssouser key
  35. */
  36. public static String SSO_USER = "sso_user:name:%s";
  37. /**
  38. * 开发者信息
  39. */
  40. public static String TM_DEVELOPER = "developer:appid:%s";
  41. /**
  42. * 场景浏览量
  43. */
  44. public static String SCENE_VISIT_CNT = "scene:visit:cnt:scenecode:%s";
  45. /**
  46. * 场景码池
  47. */
  48. public static String FDKANKAN_SCENE_NUMS = "4dkankan:scene:nums";
  49. public static final String SCENE_BUILDING = SYSTEM_PREFIX+":scene:building:";
  50. public static final String PREFIX_DOWNLOAD_PROGRESS="downloads:progress:";
  51. public static final String DOWNLOAD_TASK="downloads:task";
  52. /**
  53. * scenejson缓存
  54. */
  55. public static final String SCENE_JSON = "scenejson:num:%s";
  56. /**
  57. * 场景热点hash列表
  58. */
  59. public static final String SCENE_HOT_DATA = "scene:hotdata:num:%s";
  60. }