We use the db instance globally with establisheddatabase.

This commit is contained in:
2018-03-19 15:23:54 +01:00
parent 4ab3946181
commit e27d5c7084
3 changed files with 11 additions and 15 deletions

View File

@@ -2,8 +2,7 @@ const Cache = require('src/tmdb/cache');
const SqliteDatabase = require('src/database/sqliteDatabase');
function createCacheEntry(key, value) {
const database = new SqliteDatabase(':memory:');
const cache = new Cache(database);
const cache = new Cache();
return cache.set(key, value);
}