Skip to content

Commit

Permalink
Thread safe cache
Browse files Browse the repository at this point in the history
  • Loading branch information
walison17 authored and iurisilvio committed Oct 19, 2022
1 parent c7ddf0a commit 106e288
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cacheback/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,12 @@ def __init__(self):
self.cache_alias = self.cache_alias or getattr(
settings, 'CACHEBACK_CACHE_ALIAS', DEFAULT_CACHE_ALIAS
)
self.cache = caches[self.cache_alias]
self.task_options = self.task_options or {}

@property
def cache(self):
return caches[self.cache_alias]

def get_init_args(self):
"""
Return the args that need to be passed to __init__ when
Expand Down

0 comments on commit 106e288

Please sign in to comment.