Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TTLs to DynamoDB implementation #35

Merged
merged 3 commits into from
Mar 27, 2020
Merged

Add TTLs to DynamoDB implementation #35

merged 3 commits into from
Mar 27, 2020

Conversation

Sayan-
Copy link
Contributor

@Sayan- Sayan- commented Mar 26, 2020

Expands on #34 by adding a TTL attribute on the objects to prevent leaving old buckets behind indefinitely. It is configured in Storage.New

dynamodb/db.go Outdated
Version: 0,
TTL: time.Now().Add(ttl),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: my OCD gets triggered by these two calls to time.Now() and how they'll be slightly different. Can be replaced with one call + storing it in a local variable e.g. now := time.Now()

@Sayan- Sayan- merged commit 0c09da0 into dynamo Mar 27, 2020
@Sayan- Sayan- deleted the dynamo-ttl branch March 27, 2020 00:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants