Skip to content

SessionConfig.sliding_expiration description says 'on each access' #366

Description

@allen0099

Found during the docs audit (#360). The docs were corrected, but the field description is a string in code, which the audit could not touch.

fastapi_cachex/session/config.py:88-91:

sliding_expiration: bool = Field(
    default=True,
    description="Whether to refresh session expiry on each access",
)

The session is renewed only once less than session_ttl * sliding_threshold remains, not on every access (and get_session() saves only when it renews). The description shows up in IDEs, the JSON schema and the API reference. Suggested: "Whether to extend the session expiry once less than sliding_threshold of session_ttl remains". Also check the other SessionConfig field descriptions against the behaviour at the same time.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationsessionSession management subsystem

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions