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 a separate cache for file digests #116

Merged
merged 2 commits into from
Jun 17, 2016

Conversation

virtuald
Copy link
Contributor

@virtuald virtuald commented Mar 4, 2016

Turns out, those file digests get really annoying if you have a hundred or so packages that are 40mb each (don't ask... ). This improves the cache and makes that less annoying.

@ankostis
Copy link
Member

Nice,
Just describe a bit more in the commit message and/or here why #101 was not enough, and what does this differently.
I don't have any experience with such heavy loads.

- It's harder to make the listdir cache not recalculate, because when a file changes you need to only touch the file that changed. However, for file digests, the key is one-to-one, and very simple to invalidate.
- This cache is especially useful when you have a lot of really large packages
@virtuald
Copy link
Contributor Author

Updated the commit, should work now...

@virtuald
Copy link
Contributor Author

Also added a fix for --hash-algo=off in here, in case someone decides that approach is better for them.

@ankostis
Copy link
Member

Very well!

(are you still insisting not to participate to pypiserver team?)

@virtuald
Copy link
Contributor Author

Yep. Just because I don't want to be on the team doesn't mean that I won't fix issues that affect me. :)

@mplanchard
Copy link
Contributor

Can we get unit tests for the new caching functionality?

If not, I'll look into adding some this weekend.

@ankostis
Copy link
Member

I was also not accustomed to pytest when I took over this project - and I think the setup of the fixtures is not optimal, but i still gave it a try and it is not completely worthless framework.
Anyway, you mau add unittests and I ll try to convert them to pytests.

@mplanchard
Copy link
Contributor

@ankostis Sorry, when I said unit tests, I meant pytests. I use "unit test" as a generic catchall term for unit tests, pytests, nose tests, etc., which is perhaps not accurate of me. Pytest is fantastic, and any tests we add should use the pytest framework.

@ankostis ankostis added this to the Next 1.2.x Release milestone Jun 17, 2016
@ankostis ankostis self-assigned this Jun 17, 2016
@ankostis ankostis merged commit 7d6c23f into pypiserver:master Jun 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants