Add expire time to cache keys

This commit is contained in:
Liam 2022-10-20 18:10:23 +01:00
parent 756138f8a0
commit 519e9ae5a2
2 changed files with 1 additions and 5 deletions

View File

@ -15,11 +15,7 @@ To get started go to <https://bs-overlay.fascinated.cc> and it is fairly self ex
## Todo
- Move caches to Redis
- Move media to my CDN server
- Cache BeatSaver data
- Add cache status in the response headers
- Move configuration files to ENV files
- Add toggle for showing pp
- Cleanup the API (or just re-do it)
- Change the song time to a circular style in the song art

View File

@ -9,7 +9,7 @@ const client = new Redis({
client.connect().catch(() => {});
async function setValue(key, value, expireAt = 86400) {
await client.set(key, value);
await client.set(key, value, "EX", expireAt);
}
async function getValue(key) {