Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
Compare
Choose a tag to compare
Loading
@vividvillavividvilla released this 01 Jun 09:00
· 2 commits to master since this release

What's Changed

  • Store API Changes

    • The Store no longer generates the session ID; it is now passed on to theCreate() method.
    • Introduced a new method,SetMulti(), to set key-value pairs.
    • TheCommit() method has been removed. BothSet() andSetMulti() methods now apply changes immediately to the store.
    • TheClear() method now only empties the session.
    • A new method,Destroy(), has been added to delete the session.
  • Session Manager API Changes

    • Cookie-related options have been moved toOptions.Cookie.
    • TheRegisterSetCookie andRegisterGetCookie methods have been removed and replaced withSetCookieHooks, which takes get and set cookie callbacks respectively.
    • TheOptions.DisableAutoSet option has been removed and replaced withOptions.EnableAutoCreate. A new session will not be created automatically unlessOptions.EnableAutoCreate is set totrue.
    • Added a new method,manager.NewSession(), to create a new session. Since sessions are not created automatically onAcquire() ifOptions.EnableAutoCreate is not set totrue.
    • TheAcquire() method now takes context as the first parameter instead of the last.
    • Introduced a new method,SetCookieHooks, which can be used to override session ID generation and validation. By default, a 32-character alphanumeric ID is generated, and the length can be changed usingOptions.SessionIDLength.
  • Session API Changes

    • Removed theErrorFieldNotFound error. The store returns anil value if a field is not found. If chained with type assertion helpers, thenErrNil will be raised when the value isnil.
    • TheLoadValues() andResetValues() methods have been removed and replaced withCache() andResetCache() methods. Unlike the previous version, all mutations are saved in the cache ifCache() is called.
    • TheClear() method no longer clears the cookie and only empties the session. Use the newDestroy() method to delete the session and clear the cookie.

Full Changelog:v2.0.1...v3.0.0

Assets2
Loading
abhinavxd reacted with rocket emoji
1 person reacted

[8]ページ先頭

©2009-2025 Movatter.jp