api: implement redis/memory store for cache

This commit is contained in:
jj
2024-10-30 19:06:46 +00:00
parent 5e92b649a3
commit 18acad19b9
6 changed files with 199 additions and 0 deletions

10
api/src/store/store.js Normal file
View File

@@ -0,0 +1,10 @@
import { env } from '../config.js';
let _export;
if (env.redisURL) {
_export = await import('./redis-store.js');
} else {
_export = await import('./memory-store.js');
}
export default _export.default;