+ (NSString*)getCacheDirectory
{
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
NSString *dir = [[paths objectAtIndex:0]stringByAppendingPathComponent:@"IMCache"];
if (![[NSFileManagerdefaultManager] fileExistsAtPath:dir])
{
[[NSFileManagerdefaultManager] createDirectoryAtPath:dir
withIntermediateDirectories:YES
attributes:nil
error:NULL];
}
return dir;
}