See: https://issues.apache.org/jira/browse/CB-3071
On Thu, Sep 19, 2013 at 3:46 PM, Sethi, Raman <[email protected]> wrote: > We have an enterprise app, a part of which is online and we are seeing > that NSURLCache works fine when the cache bits are served from the memory. > > Now if the app exited and is restarted (as opposed to resumed) NSURLCache > is not serving the pages from the disk (as memory cache is wiped) > > The disk part of the cache below seems to be populated as the sqlite DB is > not empty and is growing in size as the online part of the application is > browsed > but returns nil when asked for the cached copy of the document. > > Has anybody run into this ? > > int cacheSizeMemory = 8 * 1024 * 1024; // 8MB > int cacheSizeDisk = 32 * 1024 * 1024; // 32MB > NSURLCache* sharedCache = [[NSURLCache alloc] > initWithMemoryCapacity:cacheSizeMemory diskCapacity:cacheSizeDisk diskPath:@ > "nsurlcache"]; > [NSURLCache setSharedURLCache:sharedCache]; > > Thanks > > Raman >
