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):
def __init__(self, ttl=10):
def __init__(self, ttl=60):
self._ttl = ttl
self._added = {}

View file

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