This commit is contained in:
GoEdgeLab
2024-07-27 14:15:25 +08:00
parent be70925770
commit 5a17ae9d79
520 changed files with 2515 additions and 762 deletions

View File

@@ -1,8 +1,9 @@
package ttlcache
import (
"github.com/TeaOSLab/EdgeAPI/internal/utils"
"time"
"github.com/TeaOSLab/EdgeAPI/internal/utils"
)
var SharedCache = NewCache()

View File

@@ -1,16 +1,17 @@
package ttlcache
import (
"github.com/TeaOSLab/EdgeAPI/internal/utils"
"github.com/TeaOSLab/EdgeAPI/internal/utils/testutils"
"github.com/iwind/TeaGo/assert"
"github.com/iwind/TeaGo/rands"
"github.com/iwind/TeaGo/types"
"runtime"
"strconv"
"sync/atomic"
"testing"
"time"
"github.com/TeaOSLab/EdgeAPI/internal/utils"
"github.com/TeaOSLab/EdgeAPI/internal/utils/testutils"
"github.com/iwind/TeaGo/assert"
"github.com/iwind/TeaGo/rands"
"github.com/iwind/TeaGo/types"
)
func TestNewCache(t *testing.T) {

View File

@@ -3,10 +3,11 @@
package ttlcache
import (
"github.com/TeaOSLab/EdgeAPI/internal/goman"
"github.com/TeaOSLab/EdgeAPI/internal/zero"
"sync"
"time"
"github.com/TeaOSLab/EdgeAPI/internal/goman"
"github.com/TeaOSLab/EdgeAPI/internal/zero"
)
var SharedManager = NewManager()

View File

@@ -1,11 +1,12 @@
package ttlcache
import (
"sync"
"time"
"github.com/TeaOSLab/EdgeAPI/internal/utils"
"github.com/TeaOSLab/EdgeAPI/internal/utils/expires"
"github.com/iwind/TeaGo/types"
"sync"
"time"
)
type Piece struct {

View File

@@ -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) {