SessionRemove delete session state in store
(sessionId string)
| 74 | |
| 75 | // SessionRemove delete session state in store |
| 76 | func (store *RuntimeStore) SessionRemove(sessionId string) error { |
| 77 | store.lock.Lock() |
| 78 | defer store.lock.Unlock() |
| 79 | if element, ok := store.sessions[sessionId]; ok { |
| 80 | delete(store.sessions, sessionId) |
| 81 | store.list.Remove(element) |
| 82 | return nil |
| 83 | } |
| 84 | return nil |
| 85 | } |
| 86 | |
| 87 | // SessionGC clean expired session stores in memory session |
| 88 | func (store *RuntimeStore) SessionGC() int { |