MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / Set

Method Set

sdk/cliproxy/auth/session_cache.go:84–94  ·  view source on GitHub ↗

Set binds a session to an auth ID with TTL refresh.

(sessionID, authID string)

Source from the content-addressed store, hash-verified

82
83// Set binds a session to an auth ID with TTL refresh.
84func (c *SessionCache) Set(sessionID, authID string) {
85 if sessionID == "" || authID == "" {
86 return
87 }
88 c.mu.Lock()
89 c.entries[sessionID] = sessionEntry{
90 authID: authID,
91 expiresAt: time.Now().Add(c.ttl),
92 }
93 c.mu.Unlock()
94}
95
96// Invalidate removes a specific session binding.
97func (c *SessionCache) Invalidate(sessionID string) {

Callers 15

doJSONMethod · 0.45
sessionREPLFunction · 0.45
cmdObserveFunction · 0.45
fetchModelsFunction · 0.45
fetchModelsFunction · 0.45
codexModelsURLFunction · 0.45
HeadersMethod · 0.45
PickMethod · 0.45

Calls

no outgoing calls