aboutsummaryrefslogtreecommitdiffstats
path: root/api/app/core/cache.py
diff options
context:
space:
mode:
Diffstat (limited to 'api/app/core/cache.py')
-rw-r--r--api/app/core/cache.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/api/app/core/cache.py b/api/app/core/cache.py
new file mode 100644
index 0000000..09d03c8
--- /dev/null
+++ b/api/app/core/cache.py
@@ -0,0 +1,13 @@
+from app.core.config import settings
+import redis
+
+def create_redis():
+ return redis.ConnectionPool(
+ host=settings.REDIS_SERVER,
+ port=settings.REDIS_PORT,
+ db=settings.REDIS_DB,
+ decode_responses=True,
+ )
+
+
+pool = create_redis() \ No newline at end of file