Abandoning sqlite cache

This commit is contained in:
Rafi
2023-02-13 14:29:01 +08:00
parent 65629ca5a6
commit 1ee3469978
5 changed files with 400 additions and 113 deletions

View File

@@ -1,18 +0,0 @@
import Keyv from 'keyv'
import KeyvSqlite from "@keyv/sqlite";
const sqlite = new KeyvSqlite()
const cacheOptions = {
namespace: 'settings',
uri: 'sqlite://database.sqlite',
}
const cache = new Keyv(cacheOptions);
export const getSetting = async (key) => {
return await cache.get(key)
}
export const setSetting = async (key, value) => {
return await cache.set(key, value)
}