18 lines
730 B
JavaScript
18 lines
730 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.loadCachedRound = loadCachedRound;
|
|
const config_1 = require("../../../config");
|
|
const roundCache_1 = require("../../../realtime/redis/roundCache");
|
|
/** Load player-visible round fields from Redis when cache is enabled. */
|
|
async function loadCachedRound(intervalMinutes, openMs) {
|
|
if (!config_1.config.redis.enabled || !config_1.config.redis.roundCacheEnabled)
|
|
return null;
|
|
try {
|
|
return await (0, roundCache_1.getRoundCache)(intervalMinutes, openMs);
|
|
}
|
|
catch (e) {
|
|
console.error('[roundCache] loadCachedRound failed, using DB state:', e);
|
|
return null;
|
|
}
|
|
}
|
|
//# sourceMappingURL=roundCache.js.map
|