源战役
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

47 行
2.7 KiB

  1. %%%---------------------------------------------------------------------
  2. %%% 全局缓存Key值定义
  3. %%%---------------------------------------------------------------------
  4. %% 全局缓存Key值定义
  5. -define (CACHE_KEY(Type, Key), {Type, Key}).
  6. %% 缓存刷新类型
  7. -define (CACHE_REFRESH_HOT, 1). %% 缓存刷新类型:热更配置刷新
  8. -define (CACHE_REFRESH_TWELVE, 2). %% 缓存刷新类型:24点刷新
  9. %% -define (CACHE_REFRESH_THREE, 3). %% 缓存刷新类型:3点刷新
  10. -define (CACHE_REFRESH_FOUR, 3). %% 缓存刷新类型:4点刷新
  11. %%% Usage:
  12. %%% 新增key_value缓存步骤
  13. %%% 1. def_cache.hrl中定义一个缓存type类型
  14. %% 需要刷新缓存的,继续步骤2,3;否则End.
  15. %%% 2. ?CACHE_CALLBACK_LIST中添加刷新缓存回调函数 M:F()
  16. %%% 3. 实现刷新缓存回调函数 M:F()
  17. %%% End.
  18. %%%---------------------------------------------------------------------
  19. %%% 缓存type定义
  20. %%%---------------------------------------------------------------------
  21. -define (CACHE_TOTAL_RECHARGE, 2). %% 缓存类型:充值总额(元宝)
  22. -define (CACHE_RECHARGE_DAILY_GIFT, 3). %% 缓存类型:充值活动-每日礼包列表
  23. -define (CACHE_DAILY_RECHARGE, 4). %% 缓存类型:玩家每日充值金额
  24. -define (CACHE_TOTAL_RMB, 5). %% 缓存类型:充值总额(金额)
  25. -define (CACHE_RACE_RANK, 6). %% 缓存类型:跨服竞榜活动
  26. -define (CACHE_LOGIN_REWARDS, 7). %% 缓存类型:七天登录
  27. -define (CACHE_PASS_CODEX, 8). %% 缓存类型:通行证宝典奖励数据
  28. -define (CACHE_LUCKY_BAG_VIE, 9). %% 缓存类型: 福袋红包传闻数据
  29. -define (CACHE_LOGGER_HANDLER, 10). %% 缓存类型: 日志更新
  30. %%%---------------------------------------------------------------------
  31. %%% 缓存刷新回调函数列表
  32. %%%---------------------------------------------------------------------
  33. -define (CACHE_CALLBACK_LIST, [
  34. %% 基本格式(Format)
  35. %% {缓存type, data_module, M, F, 热更配置刷新(0否|1是), 24点刷新, 3点刷新}
  36. %% data_module :: atom() 配置模块名
  37. %% M|F :: atom() 缓存刷新回调函数M:F()
  38. {?CACHE_RACE_RANK, data_race_rank, race_rank_act, reload_config, 1, 0, 0},
  39. {?CACHE_RECHARGE_DAILY_GIFT, data_daily_gift, lib_daily_gift, update_daily_gift_cache, 0, 0, 1},
  40. {?CACHE_LOGIN_REWARDS, data_login_reward, lib_login_reward, reload_config, 1, 0, 0},
  41. {?CACHE_PASS_CODEX, data_pass_codex, custom_act_phantom, reload_config, 1, 0, 0},
  42. {?CACHE_LUCKY_BAG_VIE,data_custom_act,mod_lucky_bag_ctrl,reload_config,1,0,0},
  43. {?CACHE_LOGGER_HANDLER,logger_game_h,logger_game_h,code_switch,1,0,0}
  44. ]).