-
Notifications
You must be signed in to change notification settings - Fork 361
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PINDiskCache] Respect small byteLimit settings by checking object si…
…ze in setObject: (#198) * [PINDiskCache] Respect small byteLimit settings by checking object size in setObject: This serves as a mechanism for some clients, like users of the Texture framework, to effectively disable the PINDiskCache by setting a byteLimit of 1. Before this change, the cache would transiently exceed the byte limit by writing the file anyway, and then immediately deleting it. This change will not affect most users of PINDiskCache, but is important for this specific use case. * [PINDiskCache] Fast-path objectForKey: when the cache is empty. * Fill out changelog * Ensure lock is acquired before early return in read path; fix test.
- Loading branch information
1 parent
3a95246
commit c8a0d67
Showing
2 changed files
with
23 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters