@aaron asked that we capture the TODO items in RESTBagOStuff.php, so I'm creating a task for each.
@Aklapper good question! So, this is a sub-task of T215533, which is about building the MediaWiki objectcache class that will interface with the new session storage service T206016. The work is to make an implementation of the BagOStuff interface, which is the high-level key-value storage internal API. Although *BagOStuff classes are primarily used for caches, session storage isn't strictly a cache. So... suggestions?
Removing myself as assignee because I am not currently working on this, and am not scheduled to in the near future. I would not object to working on it on the future if plans and priorities allow, but I do not want to give a false impression of status or discourage anyone else from taking it over.