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

RistrettoStore always returns a TTL of 0 for GetWithTTL #265

Closed
blampe opened this issue Jan 6, 2025 · 0 comments · Fixed by #266
Closed

RistrettoStore always returns a TTL of 0 for GetWithTTL #265

blampe opened this issue Jan 6, 2025 · 0 comments · Fixed by #266

Comments

@blampe
Copy link
Contributor

blampe commented Jan 6, 2025

Please describe the a concise description and fill out the details below. It will help others efficiently understand your request and get to an answer instead of repeated back and forth. Providing a minimal, complete and verifiable example will further increase your chances that someone can help.

Steps for Reproduction

Call GetWithTTL on a Ristretto store.

Expected behavior:

The key's TTL should be returned.

Actual behavior:

A TTL of 0 is always returned.

// GetWithTTL returns data stored from a given key and its corresponding TTL
func (s *RistrettoStore) GetWithTTL(ctx context.Context, key any) (any, time.Duration, error) {
value, err := s.Get(ctx, key)
return value, 0, err
}

Platforms:

N/A

Versions:

v4.1.6

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 a pull request may close this issue.

1 participant