mirror of
https://github.com/sqlmapproject/sqlmap
synced 2026-01-28 11:08:38 +01:00
Better update regarding 6acb2480b8
This commit is contained in:
parent
44a46d2b10
commit
42cbd94fa4
1 changed files with 4 additions and 1 deletions
|
|
@ -13,7 +13,10 @@ def cachedmethod(f, cache={}):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def _(*args, **kwargs):
|
def _(*args, **kwargs):
|
||||||
key = (f, tuple(args), str(kwargs))
|
try:
|
||||||
|
key = (f, tuple(args), frozenset(kwargs.items()))
|
||||||
|
except:
|
||||||
|
key = "".join(str(_) for _ in (f, args, kwargs))
|
||||||
if key not in cache:
|
if key not in cache:
|
||||||
cache[key] = f(*args, **kwargs)
|
cache[key] = f(*args, **kwargs)
|
||||||
return cache[key]
|
return cache[key]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue