Change cache duration
This commit is contained in:
parent
27aba46f52
commit
4c6109a1d6
|
|
@ -32,7 +32,7 @@ class Album(models.Model):
|
|||
|
||||
if count is None:
|
||||
count = self.photos.count()
|
||||
cache.set(key, count, 60 * 60 * 24) # Cache 24 h
|
||||
cache.set(key, count, 60 * 10) # Cache 10 min
|
||||
|
||||
return count
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue