Conversation
Codecov Report
@@ Coverage Diff @@
## master #90 +/- ##
==========================================
- Coverage 99.68% 99.48% -0.21%
==========================================
Files 14 14
Lines 955 1166 +211
==========================================
+ Hits 952 1160 +208
- Misses 3 6 +3
Continue to review full report at Codecov.
|
|
Would it be possible to add some unit tests? Otherwise I like this idea |
Scheduling garbage collection by time isn't appropriate for short-lived applications. This adds an alternative API which allows you to schedule the garbage collection instantly.
Defaulting to require 10% of free disk space does not make sense for some apps. For example, on a huge disk, say 64GB, there is no reason to require 6GB free space for a 30MB cache.
|
Tests added! I have some trouble reproducing the failed tests from travis - they are in some unchanged tests (but may be related to me changing the default disk cache size). However, they seem kind of implementation-dependent since I tried running the tests on all similar simulators on my computer. 🤔 It is probably because the code in This bug seems to have existed before, but appeared in tests now that I changed the disk sizes during testing. Suggestions for a solution? |
| isa = XCBuildConfiguration; | ||
| baseConfigurationReference = 9C882A801C65422700D463BB /* project.xcconfig */; | ||
| buildSettings = { | ||
| CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; |
There was a problem hiding this comment.
We want to put all of these in our xcconfig file. To keep the Xcode project clean and make it easier to maintain. See https://github.com/spotify/SPTPersistentCache/blob/master/ci/spotify_os.xcconfig
…into pull-updates-from-spotify # Conflicts: # Sources/SPTPersistentCache.m
Expose
enqueueGarbageCollectionScheduling garbage collection by time isn't appropriate for short-lived applications. This adds an alternative API which allows you to schedule the garbage collection instantly. This fixes Scheduling of garbage collection #89
Expose
minimumFreeDiskSpaceFractionDefaulting to require 10% of free disk space does not make sense for some apps. For example, on a huge disk, say 64GB, there is no reason to require 6GB free space for a 30MB cache.