Minor refactoring together with a wider support for html entities

This commit is contained in:
Miroslav Stampar
2012-07-30 11:21:32 +02:00
parent 20a66567a3
commit a86f9798b2
3 changed files with 282 additions and 1 deletions

View File

@@ -1,5 +1,16 @@
# Reference: http://code.activestate.com/recipes/325205-cache-decorator-in-python-24/
#!/usr/bin/env python
"""
Copyright (c) 2006-2012 sqlmap developers (http://sqlmap.org/)
See the file 'doc/COPYING' for copying permission
"""
def cachedmethod(f, cache={}):
"""
Method with a cached content
Reference: http://code.activestate.com/recipes/325205-cache-decorator-in-python-24/
"""
def _(*args, **kwargs):
key = (f, tuple(args), frozenset(kwargs.items()))
if key not in cache: