| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Codecov Report
@@ Coverage Diff @@
## master #1183 +/- ##
==========================================
- Coverage 63.48% 63.47% -0.01%
==========================================
Files 232 232
Lines 17046 17050 +4
==========================================
+ Hits 10821 10823 +2
- Misses 6225 6227 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Sorry, something went wrong.
Even if someone keeps deleting all cached files, a file can always be used after downloading it just once. (Previously, this could have become an infinite loop if the file gets deleted sufficiently quickly every time.)
There was a problem hiding this comment.
Thanks! Great idea about making _load() private.
The only unclear part in the changes is about FileCacher.save(), see the individual comments.
Sorry, something went wrong.
|
Merged. Thanks! I'm not sure there is a need for an option to disable this behavior. I think, for now it is fine as is. |
Sorry, something went wrong.
* Let all services share the file cache directory * Disallow destroying/purging a shared cache * After downloading a file, open the temporary file before moving Even if someone keeps deleting all cached files, a file can always be used after downloading it just once. (Previously, this could have become an infinite loop if the file gets deleted sufficiently quickly every time.) * Small changes
* Let all services share the file cache directory * Disallow destroying/purging a shared cache * After downloading a file, open the temporary file before moving Even if someone keeps deleting all cached files, a file can always be used after downloading it just once. (Previously, this could have become an infinite loop if the file gets deleted sufficiently quickly every time.) * Small changes
| Back | FazBrowse Home | New Git URL |
Implement approach 2 from #1182.
Precaching is not re-enabled in this pull-request.
Services automatically create the shared cache directory if it doesn't exist yet, leading to potential race conditions (#1182 (comment)). The shared cache directory is also created by prerequisites.py install. (In fact, the same holds for config.temp_dir and config.cache_dir, which are also automatically created if they don't exist.) An alternative would be to fail and ask the admin to re-run prerequisites.py install.
In the original issue #154, Giovanni suggested an option to switch back to private caches. I could add an option to cms.conf if this is still desirable.