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 behaviors to cache rather than muddying the Get function #86

Merged
merged 3 commits into from
Jun 29, 2023

Conversation

peterbroadhurst
Copy link
Contributor

No description provided.

Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
@@ -32,7 +32,6 @@ linters:
disable-all: false
enable:
- bodyclose
- depguard
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was suddenly firing for me

Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
time.Sleep(1 * time.Millisecond)
}

assert.NotNil(t, cache1.GetUnexpired("test"))
assert.NotNil(t, cache1.Get("test"))
Copy link
Contributor

@Chengxuan Chengxuan Jun 29, 2023

Choose a reason for hiding this comment

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

@peterbroadhurst can we also add a test to demonstrate how TTL works for ttlFromInitialAdd mode?

Copy link
Contributor

@Chengxuan Chengxuan Jun 29, 2023

Choose a reason for hiding this comment

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

dumb question, ignore that

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