1.优化getPlayerInfo接口

This commit is contained in:
2026-05-13 10:15:49 +08:00
parent 6a1fd639a4
commit 52b5ccb8e4
4 changed files with 85 additions and 7 deletions

View File

@@ -34,4 +34,7 @@ return [
// 玩家信息按 username 缓存Token 中间件用0 表示不缓存
'player_cache_ttl' => (int) env('API_PLAYER_CACHE_TTL', 300),
'player_cache_prefix' => env('API_PLAYER_CACHE_PREFIX', 'api:player:'),
// /api/v1/getPlayerInfo 返回体快照Redis0 表示不缓存;变更玩家数据时需 deletePlayerByUsername 失效
'player_info_snapshot_ttl' => (int) env('API_PLAYER_INFO_SNAPSHOT_TTL', 180),
'player_info_snapshot_prefix' => env('API_PLAYER_INFO_SNAPSHOT_PREFIX', 'api:v1:player_info:'),
];