mirror of
https://github.com/umami-software/umami.git
synced 2025-12-06 01:18:00 +01:00
Refactored redis usage. Added lib/cache.
This commit is contained in:
parent
3485b6268b
commit
f118bc95c1
22 changed files with 236 additions and 221 deletions
|
|
@ -32,13 +32,13 @@ function getClient() {
|
|||
async function get(key) {
|
||||
await connect();
|
||||
|
||||
return redis.get(key);
|
||||
return JSON.parse(await redis.get(key));
|
||||
}
|
||||
|
||||
async function set(key, value) {
|
||||
await connect();
|
||||
|
||||
return redis.set(key, value);
|
||||
return redis.set(key, JSON.stringify(value));
|
||||
}
|
||||
|
||||
async function del(key) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue