ca98am79 / connect-dynamodb

DynamoDB session store for Connect
http://ca98am79.github.com/connect-dynamodb/
MIT License
144 stars 66 forks source link

Support for DynamoDB TTL #39

Closed neverendingqs closed 7 years ago

neverendingqs commented 7 years ago

With the advent of DynamoDB TTL, it is now possible to automatically delete rows (sessions) from DynamoDB automatically based on a field (e.g. expires). Unfortunately, it only currently supports seconds since epoch (not milliseconds, which is what is stored in expires).

Is there a way to leverage this new DynamoDB feature?

Related: https://forums.aws.amazon.com/thread.jspa?threadID=251306, as it could also be a feature request on AWS's end.

ca98am79 commented 7 years ago

thanks - for now I think adding an expires_at attribute for this may be best. It is probably also best to default to using DynamoDB TTL, and setting reapInterval to 0 (no reaping) by default as a legacy setting.

smaclell commented 7 years ago

I think I might try making a PR to add this functionality. We need it for a project at work and I think I can get some time to work on it.

How would you want to handle migrating existing users? Leave their data/table and treat it as a breaking change? Anything I should know prior to contributing? Thanks for the solid project.

uvforce commented 7 years ago

@ca98am79 I am a newbie, and wonder how to add expires_at attribute, or dfault to using DynamDB TTL

ca98am79 commented 7 years ago

implemented with #43