The account limit and total cost limit are not strictly enforced. That is, when the cache goes to one of its limits, some of its objects can be evicted immediately, later or never, all depending on the details of the cache implementation. So the benefits of using NSPurgeabledata here are: -
Using purge memory, you allow the system to quickly recover memory if necessary, thereby improving performance. Memory marked as purge is not swapped out when it is recovered by the virtual memory system, since paging is a laborious process. Instead, data is discarded, and if necessary later, it will need to be recounted. It works like a locking mechanism, or we can say that it works like synchronization. If data is accessed by one thread, no other thread can access the same until only the first is complete.
source share