Skip to content

Feature Request: Apply a filter expression or other mechanism to return non-expired sessions (bypassing TTL reaping) #101

@tfrancois

Description

@tfrancois

I was wondering, instead of enabling TTL reaping functionality to delete expired sessions - or having to rely on DynamoDB's own unpredictable reaping intervals - why not simply perform internal filtering of result in the DynamoDBStore.prototype.get function that returns the session if the expires value has not yet expired.

This could be enabled using a flag in the options object for users who want the library to work as is. The benefit of this one or two lines of code would reliably handle session expiration (to match other express-session libraries) without depending on costly reap feature or strict reliance on whenever DynamoDB does its own session record deletion.

It's a simple and small solution that could "reap" huge benefits - pun intended! Thanks for any consideration in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions