mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 01:57:13 +02:00
Fix "memoized" helper when "expire" is not used
This commit is contained in:
@ -122,7 +122,8 @@ class memoized(object):
|
||||
def wrapper(*args, **kwargs):
|
||||
key = str(args) + str(kwargs)
|
||||
if (key not in self.cache
|
||||
or self.cache[key][0] < time.time() - self.expire):
|
||||
or (self.expire > 0
|
||||
and self.cache[key][0] < time.time() - self.expire)):
|
||||
self.cache[key] = (time.time(), func(*args, **kwargs))
|
||||
return self.cache[key][1]
|
||||
|
||||
|
Reference in New Issue
Block a user