Questions tagged [nscache]

NSCache is a cache-related class included in Apple's Foundation framework.

NSCache is similar to NSMutableDictionary, with the differences being:[1]
1. It is guaranteed to be thread-safe.
2. It is much slower to access.
3. It may throw out objects from time to time. You can set costs and limits, but they're not guaranteed to be followed.
4. It is not toll-free bridged to anything in CoreFoundation.
5. You can't query the number of objects that are in the cache.
6. You can't enumerate a cache.

154 questions
-1
votes
3 answers

How to use the same NSCache Image from tableVIew Cell to push it on a Static tableVIew

silly question maybe but, what's the best practice to use the same NSCache image from my initial tableVIew Cell to push it on a static TableView, right now i'm using the same approach on my tableVIew to get the image on my static tableView 1) I have…
Mamoun MK
  • 13
  • 5
-1
votes
1 answer

NSCache get object from another class

I am new to NSCache, I want to cache the response data and use it. So my [cache setobject] is in class A and I need to get it from class B using [cache objectForKey]. But it is always NULL.It works in same class as below.. NSURL *url = [NSURL…
-1
votes
1 answer

rendering images in background

i have a tableview which is not that complex with 5-6 subviews, but the imageview renders high res images in it, which show in a 200X174 sized imageview. The images are being downloaded asychronously and being cache to disk. But, as the user scrolls…
-2
votes
1 answer

Why SDWebImage Used LOCK on NSCache?

In NSCache document Apple says You can add, remove, and query items in the cache from different threads without having to lock the cache yourself.
itsapple
  • 28
  • 5
1 2 3
10
11