You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just that, if you pass the cache_alias option to a FunctionJob (and hence the cacheback decorator), the resulting function won't respect it. The reason why is because FunctionJob's super __init__ is called before self.cache_alias is set:
Just that, if you pass the
cache_alias
option to aFunctionJob
(and hence thecacheback
decorator), the resulting function won't respect it. The reason why is becauseFunctionJob
's super__init__
is called beforeself.cache_alias
is set:django-cacheback/cacheback/jobs.py
Lines 16 to 22 in 890772b
But of course,
FunctionJob
's super__init__
depends onself.cache_alias
, so it's too late to influence the initialization of the cache.I'm actually responsible for this bug, so I'll also submit a PR. 🙂
The text was updated successfully, but these errors were encountered: