mirror of
https://github.com/FuzzyGrim/Yamtrack.git
synced 2026-03-03 02:37:02 +00:00
add redis persistance
This commit is contained in:
@@ -5,3 +5,5 @@ __pycache__
|
||||
venv
|
||||
src/staticfiles
|
||||
src/db/db.sqlite3
|
||||
src/db/redis.db
|
||||
src/db/redis.db.settings
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -5,3 +5,5 @@ __pycache__
|
||||
venv
|
||||
src/staticfiles
|
||||
src/db/db.sqlite3
|
||||
src/db/redis.db
|
||||
src/db/redis.db.settings
|
||||
|
||||
@@ -187,7 +187,7 @@ AUTH_USER_MODEL = "users.User"
|
||||
|
||||
IMG_NONE = "https://www.themoviedb.org/assets/2/v4/glyphicons/basic/glyphicons-basic-38-picture-grey-c2ebdbb057f2a7614185931650f8cee23fa137b93812ccb132b9df511df1cfac.svg"
|
||||
|
||||
backend = requests_cache.RedisCache(connection=Redis())
|
||||
backend = requests_cache.RedisCache(connection=Redis(BASE_DIR / "db" / "redis.db"))
|
||||
requests_cache.install_cache(
|
||||
backend=backend,
|
||||
expire_after=21600,
|
||||
|
||||
Reference in New Issue
Block a user