Skip to content

Commit

Permalink
Merge pull request #134 from rebkwok/cache
Browse files Browse the repository at this point in the history
Try filesystem cache instead of memcached
  • Loading branch information
rebkwok authored Aug 18, 2024
2 parents 34d9f24 + 3eb8657 commit 49e03c9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ provision/.vaultpass
pipsevents.log
.venv*/
prices.json
cache/
9 changes: 4 additions & 5 deletions pipsevents/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
)

# use local cache for tests
if TESTING or env('LOCAL'):
if TESTING:
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
Expand All @@ -126,10 +126,9 @@
}
else: # pragma: no cover
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
'LOCATION': '127.0.0.1:11211',
'KEY_PREFIX': 'pips',
"default": {
"BACKEND": 'django.core.cache.backends.filebased.FileBasedCache',
"LOCATION": root("cache"),
}
}

Expand Down

0 comments on commit 49e03c9

Please sign in to comment.