Skip to content

Questions regarding the diskStorage cache #2096

Answered by onevcat
FaizanDurrani asked this question in Q&A
Discussion options

You must be logged in to vote

There should be no restriction from Kingfisher to write the cached images to the .documentDirectory. However, it apparently violates Apple's guideline of "putting the re-generatable contents to cache folder". I am not sure if Apple would reject this in the review or not, so use it at your risk.

Besides of the sizeLimit, there is also an expiration duration inside Kingfisher to clear outdated cached images from time to time. Refer to the wiki for more. Basically, you may want to also set it:

cache.diskStorage.config.expiration = .never

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@FaizanDurrani
Comment options

Answer selected by FaizanDurrani
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants