fix(core): Update CI workflows and dependencies; apply small bugfixes and formatting improvements
This commit is contained in:
@@ -64,9 +64,15 @@ export class LevelCache extends AbstractCache {
|
||||
}
|
||||
|
||||
// store things
|
||||
public async storeCacheEntryByKey(keyArg: string, cacheEntryArg: CacheEntry): Promise<void> {
|
||||
public async storeCacheEntryByKey(
|
||||
keyArg: string,
|
||||
cacheEntryArg: CacheEntry,
|
||||
): Promise<void> {
|
||||
cacheEntryArg.key = keyArg;
|
||||
const targetCache = await this.cacheRouter.getCacheForStoreAction(keyArg, cacheEntryArg);
|
||||
const targetCache = await this.cacheRouter.getCacheForStoreAction(
|
||||
keyArg,
|
||||
cacheEntryArg,
|
||||
);
|
||||
cacheEntryArg.createdAt = Date.now();
|
||||
await targetCache.storeCacheEntryByKey(keyArg, cacheEntryArg);
|
||||
}
|
||||
@@ -76,7 +82,8 @@ export class LevelCache extends AbstractCache {
|
||||
* retrieve cache entry
|
||||
*/
|
||||
public async retrieveCacheEntryByKey(keyArg: string): Promise<CacheEntry> {
|
||||
const targetCache = await this.cacheRouter.getCacheForRetrieveAction(keyArg);
|
||||
const targetCache =
|
||||
await this.cacheRouter.getCacheForRetrieveAction(keyArg);
|
||||
if (targetCache) {
|
||||
const cacheEntry = await targetCache.retrieveCacheEntryByKey(keyArg);
|
||||
if (cacheEntry.createdAt + cacheEntry.ttl < Date.now()) {
|
||||
|
Reference in New Issue
Block a user