MCPcopy
hub / github.com/gofiber/fiber / Release

Method Release

middleware/session/session.go:85–90  ·  view source on GitHub ↗

Release releases the session back to the pool. This function should be called after the session is no longer needed. This function is used to reduce the number of allocations and to improve the performance of the session store. The session should not be used after calling this function. Important

()

Source from the content-addressed store, hash-verified

83// sess := session.Get(ctx)
84// defer sess.Release()
85func (s *Session) Release() {
86 if s == nil {
87 return
88 }
89 releaseSession(s)
90}
91
92func releaseSession(s *Session) {
93 s.mu.Lock()

Callers 15

getRawMethod · 0.45
setRawMethod · 0.45
delRawMethod · 0.45
getSessionMethod · 0.45
GetByIDMethod · 0.45
Test_Store_GetByIDFunction · 0.45
Test_SessionFunction · 0.45
Test_Session_TypesFunction · 0.45
Test_Session_Store_ResetFunction · 0.45
Test_Session_KeyTypesFunction · 0.45

Calls 1

releaseSessionFunction · 0.85

Tested by 15

Test_Store_GetByIDFunction · 0.36
Test_SessionFunction · 0.36
Test_Session_TypesFunction · 0.36
Test_Session_Store_ResetFunction · 0.36
Test_Session_KeyTypesFunction · 0.36
Test_Session_SaveFunction · 0.36