Permalink
Browse files

small fix in setup

  • Loading branch information...
1 parent 39b5170 commit 62e09928dce5213cc7374191cc283ba70f8b5920 @unaxfromsibiria committed Apr 8, 2012
Showing with 9 additions and 8 deletions.
  1. +1 −0 README.rst
  2. +4 −4 django_rediscache/setup.py
  3. +4 −4 test_app/django_rediscache/setup.py
View
@@ -56,4 +56,5 @@ Create section DJANGO_REDISCACHE in django settings::
- `'get' - use cache in QuerySet for all get request`
And don't forget add 'django_rediscache' in INSTALLED_APPS. All simple and can sometimes be effective, look at test results.
+There is analog project if it will be usefull https://github.com/Suor/django-cacheops
Sincerely, Michael Vorotyntsev.
@@ -9,13 +9,13 @@
from invalidation import model_change
def _post_save(sender, **kwargs):
- if kwargs.get('created'):
- instance = kwargs.get('instance')
+ instance = kwargs.get('instance')
+ if instance:
model_change(instance.pk, instance._meta.db_table)
def _post_delete(sender, **kwargs):
- if kwargs.get('created'):
- instance = kwargs.get('instance')
+ instance = kwargs.get('instance')
+ if instance:
model_change(instance.pk, instance._meta.db_table)
def install():
@@ -9,13 +9,13 @@
from invalidation import model_change
def _post_save(sender, **kwargs):
- if kwargs.get('created'):
- instance = kwargs.get('instance')
+ instance = kwargs.get('instance')
+ if instance:
model_change(instance.pk, instance._meta.db_table)
def _post_delete(sender, **kwargs):
- if kwargs.get('created'):
- instance = kwargs.get('instance')
+ instance = kwargs.get('instance')
+ if instance:
model_change(instance.pk, instance._meta.db_table)
def install():

0 comments on commit 62e0992

Please sign in to comment.