Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix set method #131

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

fix set method #131

wants to merge 1 commit into from

Conversation

mmasterenko
Copy link

cache.set() method should return None, cause in other case it break down django.middleware.cache.UpdateCacheMiddleware (django 1.9)
at this line

response.add_post_render_callback( lambda r: self.cache.set(cache_key, r, timeout) )

cause if lambda-function return is not None value, then response.render() return value from lambda-function (True in the case), but it should return response object.

cache.set()  method should return None, cause in other case it break down django.middleware.cache.UpdateCacheMiddleware (django 1.9)
at this line 
```
response.add_post_render_callback( lambda r: self.cache.set(cache_key, r, timeout) )
```
cause if lambda-function return is not None value, then response.render()  return value from lambda-function (True in the case), but it should return response object.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant