Merged in fix/cache-service-token (pull request #1571)
fix(servicetoken): cache it when using unstable_cache * fix(servicetoken): cache it when using unstable_cache * Refactor and using cacheOrGet as get/set * Refactor * Use expiresAt from cached token Approved-by: Anton Gunnarsson
This commit is contained in:
@@ -10,7 +10,7 @@ import { cacheLogger } from "../../logger"
|
||||
|
||||
export const cacheOrGet: DataCache["cacheOrGet"] = async <T>(
|
||||
key: string | string[],
|
||||
callback: (overrideTTL?: (cacheTime: CacheTime) => void) => Promise<T>,
|
||||
callback: () => Promise<T>,
|
||||
ttl: CacheTime
|
||||
): Promise<T> => {
|
||||
if (!Array.isArray(key)) {
|
||||
|
||||
Reference in New Issue
Block a user