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

Prune cache #199

Merged
merged 4 commits into from
Oct 13, 2021
Merged

Prune cache #199

merged 4 commits into from
Oct 13, 2021

Conversation

keceli
Copy link
Contributor

@keceli keceli commented Oct 12, 2021

Status

  • Ready to go

Brief Description

  • Enable tagging cache values
  • Available tags right now are only Permanent (default) and Temporary but I guess we may add more. Otherwise instead of tags we can just use a bool for temporary values.

Detailed Description (Optional)

TODOs and/or Questions

Right now just two tags, temporary and permanent
One can prune cache by deleting only temporary values
Copy link
Member

@ryanmrichard ryanmrichard left a comment

Choose a reason for hiding this comment

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

This looks like a good zero-th order means of pruning the cache.

include/pluginplay/cache/cache.hpp Outdated Show resolved Hide resolved
include/pluginplay/cache/cache.hpp Show resolved Hide resolved
include/pluginplay/cache/cache.hpp Show resolved Hide resolved
@ryanmrichard
Copy link
Member

Instead of thinking about tags as being "keep it or don't", maybe we should think about it as something like what's the slowest access memory space it's allowed to be pushed to. Then some other possible tags are:

  • compress (data can be compressed to save room, but should remain on the heap)
  • archive (it can be written to disk)

Down the road we could conceivably do some of this automatically by timing how long the module took to run and determining if it's worth saving/compressing the data vs. rerunning the module.

@keceli keceli mentioned this pull request Oct 12, 2021
2 tasks
@keceli
Copy link
Contributor Author

keceli commented Oct 12, 2021

I created an issue #200 to follow up on adding these features.

@ryanmrichard ryanmrichard linked an issue Oct 13, 2021 that may be closed by this pull request
Copy link
Member

@ryanmrichard ryanmrichard left a comment

Choose a reason for hiding this comment

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

I'm fine merging this and I think this closes #201; however, to be clear this is only the beginning of #202.

@ryanmrichard ryanmrichard merged commit d583472 into master Oct 13, 2021
@ryanmrichard ryanmrichard deleted the prune_cache branch October 13, 2021 13:51
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.

Allow cache entries to be tagged.
2 participants