Replace allegro/bigcache with something lighter.

In high frequency environment the allegro bigcache caused significant
memory usage overhead. This commit replaces it with something much lighter.
This commit is contained in:
2023-04-08 21:36:11 +01:00
parent 7af4e1f96a
commit 7d3abf5464
10 changed files with 90 additions and 50 deletions
+2 -3
View File
@@ -4,14 +4,13 @@ import (
"context"
"net/http"
"github.com/akyoto/cache"
"github.com/lukaszraczylo/go-simple-graphql/utils/concurrency"
"github.com/lukaszraczylo/go-simple-graphql/utils/logger"
"github.com/allegro/bigcache"
)
type cacheStore struct {
client *bigcache.BigCache
client *cache.Cache
ttl int
enabled bool
}