Cache Store
Common Patterns
// Create a queue cooldown
await Platform.Server.CacheStore.SetKey(
`BossQueue:${player.userId}`, // The key for this cache entry
os.time(), // The time the cooldown was created is stored as the value
60, // 60 second cooldown
);
// Check a queue cooldown
const result = await Platform.server.cacheStore.GetKey<number>(`BossQueue:${player.userId}`);
if (result) {
// On cooldown
} else {
// Not on cooldown
}Last updated