increase cache ttl to 60 seconds

This commit is contained in:
j 2016-01-04 15:53:54 +05:30
parent 8537026ef1
commit 3132cc02fe
2 changed files with 3 additions and 3 deletions

View file

@ -2,7 +2,7 @@ import time
class Cache(dict): class Cache(dict):
def __init__(self, ttl=10): def __init__(self, ttl=60):
self._ttl = ttl self._ttl = ttl
self._added = {} self._added = {}

View file

@ -296,7 +296,7 @@ class List(db.Model):
value = Parser(Item).find({'query': data}).count() value = Parser(Item).find({'query': data}).count()
else: else:
value = len(self.items) value = len(self.items)
state.cache.set(key, value) state.cache.set(key, value, ttl=90)
return value return value
def json(self): def json(self):