Skip to content

Commit

Permalink
feat: Switch from Memcached to Redis
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Jan 25, 2025
1 parent 7bb7872 commit 5fe1973
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# cove-oc4ids

### Caching

In non-dev or (not DEBUG mode) the default settings make use of a local memcached server. This backend requires a local memcached server running. On debian based systems this can be installed with `sudo apt install memcached`.

## Dev installation

```bash
Expand Down
4 changes: 2 additions & 2 deletions core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@
if production:
CACHES = {
"default": {
"BACKEND": "django.core.cache.backends.memcached.PyMemcacheCache",
"LOCATION": os.getenv("MEMCACHED_URL", "127.0.0.1:11211"),
"BACKEND": "django.core.cache.backends.redis.RedisCache",
"LOCATION": os.getenv("REDIS_URL", "redis://localhost:6379/0"),
}
}

Expand Down
2 changes: 1 addition & 1 deletion requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ gunicorn[setproctitle]
libcove
libcoveoc4ids[perf]
libcoveweb
pymemcache
redis[hiredis]
sentry-sdk
6 changes: 4 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ flattentool==0.26.0
# libcoveweb
gunicorn[setproctitle]==23.0.0
# via -r requirements.in
hiredis==3.1.0
# via redis
idna==3.7
# via requests
ijson==3.3.0
Expand Down Expand Up @@ -99,10 +101,10 @@ platformdirs==4.1.0
# via requests-cache
pycparser==2.20
# via cffi
pymemcache==4.0.0
# via -r requirements.in
pytz==2021.1
# via flattentool
redis==5.2.1
# via -r requirements.in
referencing==0.32.0
# via
# jsonschema
Expand Down
6 changes: 4 additions & 2 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ gunicorn[setproctitle]==23.0.0
# via -r requirements.txt
h11==0.14.0
# via wsproto
hiredis==3.1.0
# via -r requirements.txt
idna==3.7
# via
# -r requirements.txt
Expand Down Expand Up @@ -173,8 +175,6 @@ pycparser==2.20
# via
# -r requirements.txt
# cffi
pymemcache==4.0.0
# via -r requirements.txt
pysocks==1.7.1
# via urllib3
pytest==7.3.1
Expand All @@ -189,6 +189,8 @@ pytz==2021.1
# via
# -r requirements.txt
# flattentool
redis==5.2.1
# via -r requirements.txt
referencing==0.32.0
# via
# -r requirements.txt
Expand Down

0 comments on commit 5fe1973

Please sign in to comment.