Topic on Talk:Requests for comment/SessionStorageAPI

Tgr (WMF) (talkcontribs)

It would be nice to include some information on how the API inside MediaWiki is going to look. The two obvious options are

  1. add a new SessionService to the DI container with get/set/delete methods, have the default implementation fall back to the BagOStuff instance returned by ObjectCache::getInstance( $wgSessionCacheType ) and use $wgObjectCacheSessionExpiry for expiry, provide an alternative implementation that uses the new REST service (directly or via VirtualRESTService). This would require some (probably fairly trivial) refactoring in SessionManager/SessionBackend, CentralAuth and maybe OAuth.
  2. add a new BagOStuff implementation that talks to the service. As mentioned elsewhere, that would require client-side TTL support and some sort of CAS or transaction handling (the latter is probably a good thing to have anyway). It would also prevent exposing any functionality that is not supported by BagOStuff, although the current service doesn't include such functionality anyway.
Reply to "MediaWiki API"