Skip to content

Reportcard#50

Open
smcquay wants to merge 17 commits intopatrickmn:masterfrom
smcquay:reportcard
Open

Reportcard#50
smcquay wants to merge 17 commits intopatrickmn:masterfrom
smcquay:reportcard

Conversation

@smcquay
Copy link
Copy Markdown

@smcquay smcquay commented May 1, 2017

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.

cognusion and others added 17 commits February 27, 2015 15:57
* 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)
@pablodz
Copy link
Copy Markdown

pablodz commented Jan 3, 2024

Found this fork: https://github.com/arp242/zcache

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.

4 participants