Post not yet marked as solved
Click to stop watching this thread.
You have stopped watching this post. Click to start watching again.
contentPostList.repliesup-voted.tooltip
Replied In
Using URLCache subclasses with URLSession
@eskimo much as I expect you are right that sub-classing URLCache could result in a path of pain, implementing one's own cache could result in an equal path of pain. Some considerations:
URLCache uses an SQL DB under the hood - this is useful because it means that transactions can be used to roll back if both data and metadata fail to be written atomically, which the implementer of said custom cache implementation would also need to do. Additionally, the implementer would need to take care of eviction when the disk becomes full or when there's high memory pressure...If developers could focus on solving problems in their own domain instead of the domain that Apple ought to solve for us (providing an RFC-9111 compliant cache), we'd be more productive...it would be great if you could raise this with the relevant teams...🙏