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 2 options --noattrcache --nodatacache #500

Merged
merged 3 commits into from
Mar 27, 2018
Merged

Add 2 options --noattrcache --nodatacache #500

merged 3 commits into from
Mar 27, 2018

Conversation

benrubson
Copy link
Contributor

Hi,

This PR adds 2 new options :
--noattrcache : disables attr cache only.
--nodatacache : disables data cache only.

So this is in addition to the existing one :
--nocache : disables attr and data cache.

Thank you 👍

Ben

--nocache : disables attr and data cache.
--noattrcache : disables attr cache only.
--nodatacache : disables data cache only.
@benrubson benrubson requested review from rfjakob and vgough March 25, 2018 17:03
@benrubson benrubson added this to the 1.9.5 milestone Mar 25, 2018
@rfjakob
Copy link
Collaborator

rfjakob commented Mar 25, 2018

Hmm. What is the use case here?

@benrubson
Copy link
Contributor Author

Current "problem" is that if you want to cache attributes for a small amount of time, with let's say for example -oattr_timeout=0.1, then data is cached without timeout.
With this PR you can then do --nodatacache -oattr_timeout=0.1.
I then also added --noattrcache for consistency.

@rfjakob
Copy link
Collaborator

rfjakob commented Mar 25, 2018

Why would you want that? Shouldn't the user just use --nocache to be safe?

@rfjakob
Copy link
Collaborator

rfjakob commented Mar 25, 2018

If there is a user need for this, we should do it, but if not, I'd suggest to keep things as simple as possible

@benrubson
Copy link
Contributor Author

On some systems you may like to have a small attributes' cache to speed-up directory listing during which you can get several subsequent getattr operations for the same item.
However, data cache may not be desired.
This is why I implemented the possibility to fine-tune cache.

Copy link
Collaborator

@rfjakob rfjakob left a comment

Choose a reason for hiding this comment

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

Ok, if you think it is useful, let's go for it

@benrubson
Copy link
Contributor Author

Thank you @rfjakob 👍

@benrubson benrubson merged commit 980648c into vgough:master Mar 27, 2018
@benrubson benrubson deleted the cache branch March 27, 2018 06:57
@rfjakob rfjakob mentioned this pull request Apr 27, 2018
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