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

Method Save

middleware/session/session.go:340–342  ·  view source on GitHub ↗

Save saves the session data and updates the cookie Note: If the session is being used in the handler, calling Save will have no effect and the session will automatically be saved when the handler returns. Returns: - error: An error if the save operation fails. Usage: err := s.Save()

()

Source from the content-addressed store, hash-verified

338//
339// err := s.Save()
340func (s *Session) Save() error {
341 return s.SaveWithContext(s.resolveContext())
342}
343
344// SaveWithContext saves the session data and updates the cookie,
345// using the provided context for cancellation and timeout control.

Callers 15

Test_CSRF_WithSessionFunction · 0.45
setRawMethod · 0.45
delRawMethod · 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
Test_Session_SaveFunction · 0.45

Calls 2

SaveWithContextMethod · 0.95
resolveContextMethod · 0.95

Tested by 15

Test_CSRF_WithSessionFunction · 0.36
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