mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-11 04:07:30 -06:00
[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:
parent
66f09a8d93
commit
3ff1391a9d
3 changed files with 166 additions and 122 deletions
3
internal/cache/domain/domain_test.go
vendored
3
internal/cache/domain/domain_test.go
vendored
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue