Skip to content

Commit

Permalink
Match cache key to invalidate stale data
Browse files Browse the repository at this point in the history
Re:  Issue #170
  • Loading branch information
denning authored and mrchrisadams committed Jun 12, 2021
1 parent 5779887 commit 2160b51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/greencheck/viewsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def retrieve(self, request, *args, **kwargs):

# try our cache first before hitting the database
if not skip_cache:
cache_hit = redis_cache.get(f"domains:{domain}")
cache_hit = redis_cache.get(f"domain:{domain}")
if cache_hit:
process_log.send(domain)
return response.Response(json.loads(cache_hit))
Expand Down

0 comments on commit 2160b51

Please sign in to comment.