[performance] replace domain block cache with an in-memory radix trie (#1714)

* replace domain block cache with an in-memory radix tree

Signed-off-by: kim <grufwub@gmail.com>

* fix domain block cache init

Signed-off-by: kim <grufwub@gmail.com>

---------

Signed-off-by: kim <grufwub@gmail.com>
This commit is contained in:
kim
2023-05-01 11:36:46 +01:00
committed by GitHub
parent 66f09a8d93
commit 3ff1391a9d
3 changed files with 166 additions and 122 deletions

View File

@@ -20,13 +20,12 @@ package domain_test
import (
"errors"
"testing"
"time"
"github.com/superseriousbusiness/gotosocial/internal/cache/domain"
)
func TestBlockCache(t *testing.T) {
c := domain.New(100, time.Second)
c := new(domain.BlockCache)
blocks := []string{
"google.com",