Questions regarding the diskStorage cache #2096
-
Hello, I am trying to implement a semi-persistent cache for Kingfisher. I've observed that the default disk cache url points to the My question is, what are the consequences of changing the disk cache url to point to I am aware that this significantly increases the size of the document directory but apart from that, is there any restrictions on Kingfisher's end?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
There should be no restriction from Kingfisher to write the cached images to the Besides of the cache.diskStorage.config.expiration = .never |
Beta Was this translation helpful? Give feedback.
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: