martenframework / marten

The pragmatic web framework.
https://martenframework.com
MIT License
424 stars 24 forks source link

Add the ability to clear expired session entries #91

Closed ellmetha closed 1 year ago

ellmetha commented 1 year ago

Description

There is presently no easy way to clear expired session entries from the configured session store. In order to allow for that, we should introduce a few things:

  1. Session store implementations should define a #clear_expired_entries method (this should be an abstract method in the Marten::HTTP::Session::Store::Base class).
  2. A new clearsessions management command should be introduced in order to leverage this new capability and manually clear expired sessions.