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

feat: add support for multiple profiles #18

Merged
merged 2 commits into from
Nov 16, 2021
Merged

Conversation

bruuuuuuuce
Copy link
Contributor

closes #3
closes #14

This pr also adds support to have multiple momento profiles on your computer.

momento configure will now prompt you for a default cache name, as well as a default ttl. This will allow you to make get and set calls without having to specify these every time

momento cache get -k myKey
momento cache set -k myKey -v myValue

you can still optionally override either one of these values to use a different ttl or cache

momento cache get -k myKey --name different-cache
momento cache set -k myKey -v myValue -ttl 12345 --name another-cache

You can use alternative profiles by setting the environment variable MOMENTO_PROFILE

MOMENTO_PROFILE=production momento cache get -k myKey

gautamomento
gautamomento previously approved these changes Nov 16, 2021
Copy link
Contributor

@gautamomento gautamomento left a comment

Choose a reason for hiding this comment

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

LGTM

Just one small comment.

src/utils/file.rs Show resolved Hide resolved
@bruuuuuuuce bruuuuuuuce merged commit 5578abe into main Nov 16, 2021
@bruuuuuuuce bruuuuuuuce deleted the feat/cliProfiles branch November 16, 2021 21:22
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.

Create config file for Momento Profiles Make credentials file have 400 readonly permissions
2 participants