Browse Source

Fixed cache generation

Rafał Pitoń 10 years ago
parent
commit
52992c7039
1 changed files with 2 additions and 0 deletions
  1. 2 0
      misago/threads/counts.py

+ 2 - 0
misago/threads/counts.py

@@ -27,6 +27,7 @@ class BaseCounter(object):
 
     def get_cached_count(self):
         count = self.session.get(self.name, None)
+
         if not count or not self.is_cache_valid(count):
             count = self.get_real_count()
             self.session[self.name] = count
@@ -43,6 +44,7 @@ class BaseCounter(object):
 
     def get_real_count(self):
         return {
+            'user': self.user.pk,
             'threads': self.Threads(self.user).get_queryset().count(),
             'expires': self.get_expiration_timestamp()
         }