mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-04 06:50:14 +00:00
Fixes #1868
This commit is contained in:
parent
ad0ca69579
commit
75478c1181
2 changed files with 6 additions and 3 deletions
|
|
@ -15,10 +15,13 @@ def cachedmethod(f, cache={}):
|
|||
def _(*args, **kwargs):
|
||||
try:
|
||||
key = (f, tuple(args), frozenset(kwargs.items()))
|
||||
if key not in cache:
|
||||
cache[key] = f(*args, **kwargs)
|
||||
except:
|
||||
key = "".join(str(_) for _ in (f, args, kwargs))
|
||||
if key not in cache:
|
||||
cache[key] = f(*args, **kwargs)
|
||||
if key not in cache:
|
||||
cache[key] = f(*args, **kwargs)
|
||||
|
||||
return cache[key]
|
||||
|
||||
return _
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue