About

Filesystem-backed session storage via Flask-Session

Provides

This feature declares no public contract surface.

Configuration

Setting Default What it does
SESSION_FILE_DIR /tmp/flask_sessions Where session files are written. Under /tmp by default, which means sessions do not survive a container being recreated. A product that minds sets a path on a volume.
SESSION_FILE_THRESHOLD 100000 How many sessions are kept before the ones closest to expiry are evicted, 0 for no limit. Every anonymous visit to a page with a form stores one for its CSRF token, and cachelib's own default of 500 signed members out after 500 of them.
SESSION_FILE_ANONYMOUS_LIFETIME 86400 Seconds a session nobody signed in to is kept, a day by default, 0 for the same as a member's. Shorter than a member's, so a full store evicts visitors first.
SESSION_FILE_CLEANUP_INTERVAL 3600 Least seconds between two sweeps for expired sessions, shared by every worker using the directory, 0 to sweep only when the store is over its threshold.

These are the defaults. A product changes them in its own pyproject.toml, under [tool.splent.config], or in .env.deploy in production.

Dependencies

No hard dependencies.

In product lines

  • cms_spl In a group Exactly one of the session group, when a product takes that group
  • labcompute In a group Exactly one of the session_type group, when a product takes that group
  • marketplace_spl In a group Exactly one of the session group, when a product takes that group
  • openhubs_spl In a group Exactly one of the session group, when a product takes that group
  • openwiki_spl In a group Exactly one of the session group, when a product takes that group
  • sample_splent_spl In a group Exactly one of the session_type group, when a product takes that group

Extension points

Routes
A refinement can add routes to its blueprint

Other features fill its hook slots. A refinement can override its templates and services or extend its models without forking it.

Compatibility

Python
>=3.13
SPLENT framework
>=1.30.0
Python packages
cachelib>=0.13