fix(core): update
This commit is contained in:
@@ -3,17 +3,31 @@ import { CacheDiskManager } from './levelcache.classes.cache.diskmanager';
|
||||
import { CacheMemoryManager } from './levelcache.classes.cache.memorymanager';
|
||||
import { CacheS3Manager } from './levelcache.classes.cache.s3manager';
|
||||
import { CacheEntry } from './levelcache.classes.cacheentry';
|
||||
import { CacheRouter } from './levelcache.classes.cacherouter';
|
||||
|
||||
export interface ILevelCacheConstructorOptions {
|
||||
maxMemoryStorageInMB: number;
|
||||
maxDiskStorageInMB: number;
|
||||
maxS3StorageInMB?: number;
|
||||
smartbucketConfig?: plugins.smartbucket.ISmartBucketConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
* a leveled cache for storing things for a short time
|
||||
*/
|
||||
export class LevelCache {
|
||||
public cacheMap = new plugins.lik.Objectmap();
|
||||
public cacheRouter = new CacheRouter(this);
|
||||
public cacheDiskManager = new CacheDiskManager();
|
||||
public cacheMemoryManager = new CacheMemoryManager();
|
||||
public cacheS3Manager = new CacheS3Manager();
|
||||
|
||||
private processKey (keyArg: string) {
|
||||
public options: ILevelCacheConstructorOptions;
|
||||
|
||||
constructor(optionsArg: ILevelCacheConstructorOptions) {
|
||||
this.options = optionsArg;
|
||||
}
|
||||
|
||||
private processKey(keyArg: string) {
|
||||
if (!keyArg) {
|
||||
return plugins.smartunique.shortId();
|
||||
}
|
||||
@@ -23,7 +37,7 @@ export class LevelCache {
|
||||
/**
|
||||
* store a Blob
|
||||
*/
|
||||
public async storeBlobByKey (keyArg: string, blob: Buffer) {
|
||||
public async storeBlobByKey(keyArg: string, blob: Buffer) {
|
||||
keyArg = this.processKey(keyArg);
|
||||
return keyArg;
|
||||
}
|
||||
@@ -31,30 +45,16 @@ export class LevelCache {
|
||||
/**
|
||||
* retrieve a blob
|
||||
*/
|
||||
public async retrieveBlob (keyArg: string): CacheEntry {
|
||||
|
||||
}
|
||||
|
||||
public async retrieveBlob(keyArg: string): CacheEntry {}
|
||||
|
||||
// Cache Entries
|
||||
/**
|
||||
* store a Cache Entries
|
||||
*/
|
||||
public async storeCacheEntry(cacheEntryArg: CacheEntry): string {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* retrieve cache entry
|
||||
*/
|
||||
public async retrieveCacheEntry (): CacheEntry {
|
||||
|
||||
}
|
||||
public async retrieveCacheEntryByKey(): CacheEntry {}
|
||||
|
||||
/**
|
||||
* cleans the cache
|
||||
*/
|
||||
public clean() {
|
||||
|
||||
};
|
||||
public clean() {}
|
||||
}
|
||||
|
Reference in New Issue
Block a user