fix(core): update
This commit is contained in:
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@push.rocks/levelcache',
|
||||
version: '3.0.5',
|
||||
version: '3.0.6',
|
||||
description: 'a cache that uses memory/disk/s3 as backup'
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ 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;
|
||||
@ -47,7 +47,7 @@ export class CacheRouter {
|
||||
/**
|
||||
* gets the relevant cache to perform a retrieval action on
|
||||
*/
|
||||
async getCacheForRetrieveAction (keyArg: string): Promise<AbstractCache> {
|
||||
async getCacheForRetrieveAction(keyArg: string): Promise<AbstractCache> {
|
||||
const done = plugins.smartpromise.defer<AbstractCache>();
|
||||
const returnCache = this.cacheKeyMap.getByKey(keyArg);
|
||||
if (!returnCache && this.levelCacheRef.options.persistentCache) {
|
||||
|
@ -46,7 +46,7 @@ export class LevelCache extends AbstractCache {
|
||||
maxMemoryStorageInMB: 0.5,
|
||||
maxDiskStorageInMB: 10,
|
||||
maxS3StorageInMB: 50,
|
||||
...optionsArg
|
||||
...optionsArg,
|
||||
};
|
||||
this.init();
|
||||
}
|
||||
|
Reference in New Issue
Block a user