MCPcopy Create free account
hub / github.com/QuantumNous/new-api / userSessionCacheKey

Function userSessionCacheKey

model/user_session.go:124–127  ·  view source on GitHub ↗
(sid string)

Source from the content-addressed store, hash-verified

122}
123
124func userSessionCacheKey(sid string) string {
125 digest := common.GenerateHMACWithKey([]byte("user-session-cache-v1:"+common.SessionSecret), sid)
126 return "auth:session:" + digest
127}
128
129func userSessionCacheDeadline() time.Time {
130 return time.Now().Add(time.Duration(userCacheTTLSeconds()) * time.Second)

Calls 1

GenerateHMACWithKeyFunction · 0.92