govuk-prototype-kit
govuk-prototype-kit copied to clipboard
Investigate session data storage
What
Look at different session storage methods. Ideally the would be able to store an arbitrary amount of session data between server restarts, both locally and when hosted online. Ideally we would have one method that would work both for production and development, but prioritise having a method for local development that keeps session data between restarts, and won't emit warnings in production.
Why
See comment from @joelanman:
https://github.com/alphagov/govuk-prototype-kit/pull/1648#issuecomment-1268367384
Who needs to work on this
Developer
Who needs to review this
Developer, UCD
Done when
- [ ] An arbitrary amount of data can be stored in user sessions
- [ ] User session data is not lost between server restarts in local development
- [ ] The kit does not emit warnings about session storage when running in production
Interesting point from discussion including Ed Horsford and Frankie Roberto, session data includes defaults, so with the way defaults are currently implemented [1] users can start their session with a lot of data already (over 20 MiB in Ed's case). https://ukgovernmentdigital.slack.com/archives/C0E1063DW/p1664973477189429?thread_ts=1664972908.131459&cid=C0E1063DW
Ideally we would have the session defaults as a kind of read-only backing to the read-write user setting overlay, but that seems like it has the potential to be a rabbithole :/