FROM : Jens Alfke
DATE : Thu Apr 24 20:42:51 2008
On 23 Apr '08, at 3:14 PM, Stephan Burlot wrote:
> I want to cache local files (images) so I cache a NSData using
> [NSURLCache storeCachedResponse]
> If I try to fetch it, the cachedResponseForRequest:request is always
> nil under 10.5
> This works under 10.4.
NSURLCache was rewritten in 10.5; the new implementation probably
ignores file: URLs, because it doesn't make sense to use the
filesystem to cache data from the filesystem.
Are you sure you need to be using a cache to store local files? Why
can't you just reload the image from its original source file if you
need to? If you really need to do this, you'll need to make your own
implementation, I think.
—jens
DATE : Thu Apr 24 20:42:51 2008
On 23 Apr '08, at 3:14 PM, Stephan Burlot wrote:
> I want to cache local files (images) so I cache a NSData using
> [NSURLCache storeCachedResponse]
> If I try to fetch it, the cachedResponseForRequest:request is always
> nil under 10.5
> This works under 10.4.
NSURLCache was rewritten in 10.5; the new implementation probably
ignores file: URLs, because it doesn't make sense to use the
filesystem to cache data from the filesystem.
Are you sure you need to be using a cache to store local files? Why
can't you just reload the image from its original source file if you
need to? If you really need to do this, you'll need to make your own
implementation, I think.
—jens
| Related mails | Author | Date |
|---|---|---|
| Stephan Burlot | Apr 24, 00:14 | |
| Michael Vannorsdel | Apr 24, 19:36 | |
| Jens Alfke | Apr 24, 20:42 | |
| Stephan Burlot | Apr 25, 23:26 | |
| Michael Vannorsdel | Apr 27, 00:03 |






Cocoa mail archive

