mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-20 02:57:12 +03:00
Testing performance enhancements by enabling transformations cache
Also reduce the utilization of dynamic cast.
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "actions/action.h"
|
||||
#include "actions/transformations/transformation.h"
|
||||
@@ -28,6 +29,18 @@ class Assay;
|
||||
namespace actions {
|
||||
namespace transformations {
|
||||
|
||||
class UrlDecodeInstantCache : public std::unordered_map<std::string, std::string> {
|
||||
public:
|
||||
static UrlDecodeInstantCache& getInstance() {
|
||||
static UrlDecodeInstantCache instance;
|
||||
return instance;
|
||||
}
|
||||
|
||||
private:
|
||||
UrlDecodeInstantCache() {};
|
||||
};
|
||||
|
||||
|
||||
class UrlDecode : public Transformation {
|
||||
public:
|
||||
explicit UrlDecode(std::string action);
|
||||
|
||||
Reference in New Issue
Block a user