mirror of
https://github.com/crowdsecurity/crowdsec.git
synced 2025-05-11 20:36:12 +02:00
support for regexps result cache (#2104)
* support for regexps result cache : gcache + xxhash Co-authored-by: Marco Mariani <marco@crowdsec.net>
This commit is contained in:
parent
e71d146a2d
commit
5b0fe4b7f1
8 changed files with 173 additions and 53 deletions
6
pkg/cache/cache.go
vendored
6
pkg/cache/cache.go
vendored
|
@ -4,10 +4,10 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/bluele/gcache"
|
||||
"github.com/crowdsecurity/crowdsec/pkg/types"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/sirupsen/logrus"
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/crowdsecurity/crowdsec/pkg/types"
|
||||
)
|
||||
|
||||
var Caches []gcache.Cache
|
||||
|
@ -52,7 +52,7 @@ func CacheInit(cfg CacheCfg) error {
|
|||
cfg.LogLevel = new(log.Level)
|
||||
*cfg.LogLevel = log.InfoLevel
|
||||
}
|
||||
var clog = logrus.New()
|
||||
var clog = log.New()
|
||||
if err := types.ConfigureLogger(clog); err != nil {
|
||||
log.Fatalf("While creating cache logger : %s", err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue