fix(core): update

This commit is contained in:
Philipp Kunz 2020-02-14 17:28:13 +00:00
parent a1cb632d26
commit 7a0525bd1f
7 changed files with 51 additions and 6 deletions

View File

@ -1,8 +1,15 @@
import { expect, tap } from '@pushrocks/tapbundle';
import * as levelcache from '../ts/index';
tap.test('first test', async () => {
console.log('hi');
let testLevelCache: levelcache.LevelCache;
tap.test('should create a new levelcache instance', async () => {
testLevelCache = new levelcache.LevelCache();
expect(testLevelCache).to.be.instanceOf(levelcache.LevelCache);
});
tap.test('should cache a value', async () => {
});
tap.start();

View File

@ -0,0 +1,8 @@
import * as plugins from './levelcache.plugins';
/**
*
*/
export class CacheDiskManager {
}

View File

@ -0,0 +1,5 @@
import * as plugins from './levelcache.plugins';
export class CacheMemoryManager {
}

View File

@ -0,0 +1,8 @@
import * as plugins from './levelcache.plugins';
/**
*
*/
export class CacheS3Manager {
}

View File

@ -1 +1,5 @@
import * as plugins from './levelcache.plugins';
export class CacheEntry {
}

View File

@ -1,16 +1,22 @@
import * as plugins from './levelcache.plugins';
import { CacheDiskManager } from './levelcache.classes.cache.diskmanager';
import { CacheMemoryManager } from './levelcache.classes.cache.memorymanager';
import { CacheS3Manager } from './levelcache.classes.cache.s3manager';
/**
* a leveled cache for storing things for a short time
*/
export class LevelCache {
public cacheMap = new plugins.lik.Objectmap();
public cacheDiskManager = new CacheDiskManager();
public cacheMemoryManager = new CacheMemoryManager();
public cacheS3Manager = new CacheS3Manager();
// Blobs
/**
* store a Blob
*/
public async storeBlob () {};
public async storeBlobByKey () {};
/**
* retrieve a blob
@ -18,12 +24,19 @@ export class LevelCache {
public async retrieveBlob () {};
// Cachen Entries
// Cache Entries
/**
* store a Cache Entries
*/
public async storeCacheEntry() {};
/**
* retrieve cache entry
*/
public async retrieveCacheEntry () {};
public clean() {}
/**
* cleans the cache
*/
public clean() {};
}