kojira: make tag cache a global for better readability
This commit is contained in:
parent
ad3e116de3
commit
0599a1ed9c
1 changed files with 5 additions and 1 deletions
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue