Change cache duration
This commit is contained in:
parent
27aba46f52
commit
4c6109a1d6
1 changed files with 1 additions and 1 deletions
|
@ -32,7 +32,7 @@ class Album(models.Model):
|
||||||
|
|
||||||
if count is None:
|
if count is None:
|
||||||
count = self.photos.count()
|
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
|
return count
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue