mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2026-04-07 14:05:20 +08:00
v1.4.1
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
package ttlcache
|
||||
|
||||
import (
|
||||
"runtime"
|
||||
|
||||
"github.com/TeaOSLab/EdgeNode/internal/utils/fasttime"
|
||||
memutils "github.com/TeaOSLab/EdgeNode/internal/utils/mem"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
var SharedInt64Cache = NewBigCache[int64]()
|
||||
|
||||
@@ -1,13 +1,6 @@
|
||||
package ttlcache
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeNode/internal/utils/fasttime"
|
||||
memutils "github.com/TeaOSLab/EdgeNode/internal/utils/mem"
|
||||
"github.com/TeaOSLab/EdgeNode/internal/utils/testutils"
|
||||
"github.com/iwind/TeaGo/assert"
|
||||
"github.com/iwind/TeaGo/rands"
|
||||
"github.com/iwind/TeaGo/types"
|
||||
timeutil "github.com/iwind/TeaGo/utils/time"
|
||||
"runtime"
|
||||
"runtime/debug"
|
||||
"strconv"
|
||||
@@ -15,6 +8,14 @@ import (
|
||||
"sync/atomic"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/TeaOSLab/EdgeNode/internal/utils/fasttime"
|
||||
memutils "github.com/TeaOSLab/EdgeNode/internal/utils/mem"
|
||||
"github.com/TeaOSLab/EdgeNode/internal/utils/testutils"
|
||||
"github.com/iwind/TeaGo/assert"
|
||||
"github.com/iwind/TeaGo/rands"
|
||||
"github.com/iwind/TeaGo/types"
|
||||
timeutil "github.com/iwind/TeaGo/utils/time"
|
||||
)
|
||||
|
||||
func TestNewCache(t *testing.T) {
|
||||
|
||||
@@ -3,10 +3,11 @@
|
||||
package ttlcache
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeNode/internal/utils/goman"
|
||||
"github.com/TeaOSLab/EdgeNode/internal/utils/zero"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/TeaOSLab/EdgeNode/internal/utils/goman"
|
||||
"github.com/TeaOSLab/EdgeNode/internal/utils/zero"
|
||||
)
|
||||
|
||||
var SharedManager = NewManager()
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package ttlcache
|
||||
|
||||
import (
|
||||
"sync"
|
||||
|
||||
"github.com/TeaOSLab/EdgeNode/internal/utils/expires"
|
||||
"github.com/TeaOSLab/EdgeNode/internal/utils/fasttime"
|
||||
"sync"
|
||||
)
|
||||
|
||||
type Piece[T any] struct {
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package ttlcache
|
||||
|
||||
import (
|
||||
"github.com/iwind/TeaGo/rands"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/iwind/TeaGo/rands"
|
||||
)
|
||||
|
||||
func TestPiece_Add(t *testing.T) {
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
package ttlcache_test
|
||||
|
||||
import (
|
||||
"runtime"
|
||||
"strconv"
|
||||
"testing"
|
||||
|
||||
"github.com/TeaOSLab/EdgeNode/internal/utils/testutils"
|
||||
"github.com/TeaOSLab/EdgeNode/internal/utils/ttlcache"
|
||||
"github.com/TeaOSLab/EdgeNode/internal/utils/zero"
|
||||
"github.com/cespare/xxhash/v2"
|
||||
"runtime"
|
||||
"strconv"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestHashCollision(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user