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

Method sessionReExpire

session/store_redis.go:105–114  ·  view source on GitHub ↗

sessionReExpire reset expire session key

(state *SessionState)

Source from the content-addressed store, hash-verified

103
104// sessionReExpire reset expire session key
105func (store *RedisStore) sessionReExpire(state *SessionState) error {
106 redisClient := store.getRedisClient()
107 key := store.getRedisKey(state.SessionID())
108 _, err := redisClient.Expire(key, store.maxlifetime)
109 if store.checkConnErrorAndNeedRetry(err) {
110 redisClient = store.getBackupRedis()
111 _, err = redisClient.Expire(key, store.maxlifetime)
112 }
113 return err
114}
115
116// SessionUpdate update session state in store
117func (store *RedisStore) SessionUpdate(state *SessionState) error {

Callers 1

SessionReadMethod · 0.95

Calls 6

getRedisClientMethod · 0.95
getRedisKeyMethod · 0.95
getBackupRedisMethod · 0.95
ExpireMethod · 0.80
SessionIDMethod · 0.65

Tested by

no test coverage detected