MCPcopy Create free account
hub / github.com/devfeel/dotweb / SessionRemove

Method SessionRemove

session/store_redis.go:140–149  ·  view source on GitHub ↗

SessionRemove delete session state in store

(sessionId string)

Source from the content-addressed store, hash-verified

138
139// SessionRemove delete session state in store
140func (store *RedisStore) SessionRemove(sessionId string) error {
141 redisClient := redisutil.GetRedisClient(store.serverIp, store.maxIdle, store.maxActive)
142 key := store.getRedisKey(sessionId)
143 _, err := redisClient.Del(key)
144 if store.checkConnErrorAndNeedRetry(err) {
145 redisClient = store.getBackupRedis()
146 _, err = redisClient.Del(key)
147 }
148 return err
149}
150
151// SessionGC clean expired session states
152// in redis store,not use

Callers

nothing calls this directly

Calls 4

getRedisKeyMethod · 0.95
getBackupRedisMethod · 0.95
DelMethod · 0.80

Tested by

no test coverage detected