You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
getSession always runs createSession when readData cannot find a corresponding entry.
Another method that does not run createSession in such a case is required when you develop a member-only application and expose its login page to the public.
If createSession is called too many times (e.g. by DoS attack), the performance of a database can be degraded, especially when you use only RDBMS and do not combine it with KVS NoSQL (e.g. Redis/Valkey).
As you might notice, it returns just null without creating new one when no entry.
This will not be a breaking change unless you use third party session libraries. However, an author of a third party session library have to modify their library to implement this method. Unfortunately JavaScript/TypeScript cannot provide default method implementations in an interface unlike Java or C#.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
getSession
always runscreateSession
whenreadData
cannot find a corresponding entry.Another method that does not run
createSession
in such a case is required when you develop a member-only application and expose its login page to the public.If
createSession
is called too many times (e.g. by DoS attack), the performance of a database can be degraded, especially when you use only RDBMS and do not combine it with KVS NoSQL (e.g. Redis/Valkey).vs
As you might notice, it returns just
null
without creating new one when no entry.This will not be a breaking change unless you use third party session libraries. However, an author of a third party session library have to modify their library to implement this method. Unfortunately JavaScript/TypeScript cannot provide default method implementations in an interface unlike Java or C#.
Beta Was this translation helpful? Give feedback.
All reactions