Use user cache directory instead of ducment directory to prevent from cache to be synced back and forth in iTunes

This commit is contained in:
Olivier Poitrey 2009-09-22 17:13:56 +02:00
parent a7734af511
commit b2a3d31557
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ static SDImageCache *instance;
memCache = [[NSMutableDictionary alloc] init];
// Init the disk cache
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
diskCachePath = [[[paths objectAtIndex:0] stringByAppendingPathComponent:@"ImageCache"] retain];
if (![[NSFileManager defaultManager] fileExistsAtPath:diskCachePath])