Reputation: 17
Default cache size of SDWebImage. I need both number of files and size of total file it can handle.
Upvotes: 1
Views: 1871
Reputation: 3681
If you search through SDWebImage files on github for "maxCacheSize" you'll see that there's no default value. Since it's a @property it won't be initialised with garbage numbers, but will be set to 0. From Apple docs:
The alloc method has one other important task, which is to clear out the memory allocated for the object’s properties by setting them to zero. This avoids the usual problem of memory containing garbage from whatever was stored before...
So there's no restriction by default judging by the condition in clean up code:
if (self.maxCacheSize > 0 && currentCacheSize > self.maxCacheSize) {
//clean up code;
}
AFAIK there is no maximum amount of space that your application can use either. You can eat up all of the available space on the device if you wish.
Upvotes: 1