fix(core): Update CI workflows and dependencies; apply small bugfixes and formatting improvements
This commit is contained in:
@@ -14,12 +14,18 @@ export class CacheRouter {
|
||||
/**
|
||||
* gets the relevant cache to perform a store action on
|
||||
*/
|
||||
async getCacheForStoreAction(keyArg: string, cacheEntry: CacheEntry): Promise<AbstractCache> {
|
||||
async getCacheForStoreAction(
|
||||
keyArg: string,
|
||||
cacheEntry: CacheEntry,
|
||||
): Promise<AbstractCache> {
|
||||
let returnCache: AbstractCache;
|
||||
const mbToBytesMultiplier = 1000 * 1000;
|
||||
const maxMemoryBytes = this.levelCacheRef.options.maxMemoryStorageInMB * mbToBytesMultiplier;
|
||||
const maxDiskBytes = this.levelCacheRef.options.maxDiskStorageInMB * mbToBytesMultiplier;
|
||||
const maxS3Bytes = this.levelCacheRef.options.maxS3StorageInMB * mbToBytesMultiplier;
|
||||
const maxMemoryBytes =
|
||||
this.levelCacheRef.options.maxMemoryStorageInMB * mbToBytesMultiplier;
|
||||
const maxDiskBytes =
|
||||
this.levelCacheRef.options.maxDiskStorageInMB * mbToBytesMultiplier;
|
||||
const maxS3Bytes =
|
||||
this.levelCacheRef.options.maxS3StorageInMB * mbToBytesMultiplier;
|
||||
|
||||
switch (true) {
|
||||
case cacheEntry.contents.byteLength <= maxMemoryBytes &&
|
||||
|
Reference in New Issue
Block a user