使用缓存提升API身份认证性能(0.8ms->0.05ms)

This commit is contained in:
刘祥超
2021-01-21 10:06:59 +08:00
parent 889cb1c799
commit 11bd6ccfda
4 changed files with 76 additions and 7 deletions

View File

@@ -1,6 +1,11 @@
package models
import "github.com/iwind/TeaGo/dbs"
import (
"github.com/iwind/TeaGo/dbs"
"sync"
)
var SharedCacheLocker = sync.RWMutex{}
// 处理JSON字节Slice
func JSONBytes(data []byte) []byte {