[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
commit 3ff1391a9d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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",