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

Don't evict whole cache for large entries #40

Merged
merged 1 commit into from
Sep 14, 2023

Conversation

ericphanson
Copy link
Member

Closes #37

lru.currentsize += s
lru.dict[key] = (v, n, s)
return
Copy link
Member Author

Choose a reason for hiding this comment

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

added this so the return type is nothing independently of which branch we take. Note the return of _unsafe_index! isn't used anywhere in the codebase

@@ -1,6 +1,6 @@
name = "LRUCache"
uuid = "8ac3fa9e-de4c-5943-b1dc-09c6b5f20637"
version = "1.4.1"
version = "1.5.0"
Copy link
Member Author

Choose a reason for hiding this comment

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

counted this as a "feature", but I think it could also be seen as a bugfix (and thus a patch release)

@ericphanson
Copy link
Member Author

Could you review @Jutho?

Copy link
Collaborator

@Jutho Jutho left a comment

Choose a reason for hiding this comment

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

Thanks for this very nice PR (and for the review reminder). Looks good to me. I will check whether the GitHub actions need any updating before tagging a the new version.

@Jutho Jutho merged commit cc4d504 into JuliaCollections:master Sep 14, 2023
@ericphanson ericphanson deleted the eph/dont-evict-all branch September 14, 2023 14:05
@Jutho
Copy link
Collaborator

Jutho commented Sep 15, 2023

1.5.0 is tagged, but it seems there is something wrong with tagbot configuration as new tags are not being registered on github. Even 1.4 was also missed as it only goes up to 1.3. Something to look into.

@ericphanson
Copy link
Member Author

I see (https://github.com/JuliaCollections/LRUCache.jl/actions/runs/6195513321/job/16820375014#step:3:41):

Processing version v1.5.0 (ffc929f)
41
Generating changelog for version v1.5.0 (ffc929f)
42
git@github.com: Permission denied (publickey).
43
fatal: Could not read from remote repository.
44

45
Please make sure you have the correct access rights
46
and the repository exists.

maybe the configuration or a key needs to be updated?

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.

Skip cache if value too big
2 participants