Reportcard#50
Open
smcquay wants to merge 17 commits intopatrickmn:masterfrom
smcquay:reportcard
Open
Conversation
* ensures that when an item is added, if the number of unexpired items >= maximum number of items specified, the oldest (based on ACCESS) is expired * when an item is "gotten", or "set", the access time is updated The existing janitor system is unchanged, and used to actually delete the items. The only change from a consumer standpoint, is one addition parameter at the end of a "New" call, that specifies the maximum number of items to allow, or 0, if you want to disable the LRU at all.
under maxItems pressure. Reverted the LRU handler back to the first iteration: lazy deletion via the janitor, with bulk removal.
its former argument list, and Cache.NewWithLRU() as been added to allow setting maxItems. cache_test has also been reverted.
Removes the ctime tracking and access. Reverts NewFrom() changes from upstream, and adds NewFromWithLRU() in place of it.
…cted items array if no onEvicted function is registered
including: - gofmt -s to simplify some code - Properly capture range variable (go vet) - Update doc comments (fix golint errors)
|
Found this fork: https://github.com/arp242/zcache |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change updates linting/vetting such that goreportcard gives it an A+.
I've based this change on @cognusion's outstanding request in PR-17 so when that goes in all of the added doc comments should be up-to-date.