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

Set without expiration #143

Closed
mathvav opened this issue Aug 5, 2015 · 3 comments
Closed

Set without expiration #143

mathvav opened this issue Aug 5, 2015 · 3 comments

Comments

@mathvav
Copy link

mathvav commented Aug 5, 2015

For this function:

func (c *Client) Set(key string, value interface{}, expiration time.Duration) *StatusCmd

Is there a way to set without having an expiration time as a really far time from now? Will nil work?

@vmihailenco
Copy link
Collaborator

expiration=0 means no expiration. So if you don't want key to expire use:

cl.Set("key", "value", 0)

@mathvav
Copy link
Author

mathvav commented Aug 6, 2015

Thank you. I couldn't find that anywhere in the docs.

vmihailenco added a commit that referenced this issue Aug 7, 2015
@vmihailenco
Copy link
Collaborator

Fair point. Tried to address with #144

vmihailenco added a commit that referenced this issue Aug 8, 2015
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

No branches or pull requests

2 participants