add state.cache and cache some stuff

This commit is contained in:
j 2014-05-26 13:41:59 +02:00
commit 56be46d82e
4 changed files with 56 additions and 24 deletions

View file

@ -15,6 +15,7 @@ import websocket
import state
import node.server
import oxtornado
from cache import Cache
from item.icons import IconHandler
from item.handlers import EpubHandler, ReaderHandler, FileHandler
@ -59,6 +60,7 @@ def run():
pid.write('%s' % os.getpid())
state.main = IOLoop.instance()
state.cache = Cache(ttl=10)
def start_node():
import user