kojira: make tag cache a global for better readability

This commit is contained in:
Mike McLean 2011-08-30 17:19:05 -04:00
parent ad3e116de3
commit 0599a1ed9c

View file

@ -39,8 +39,12 @@ import time
import traceback
def getTag(session, tag, cache={}):
tag_cache = {}
def getTag(session, tag):
"""A caching version of the hub call"""
cache = tag_cache
now = time.time()
if tag in cache:
ts, info = cache[tag]