我用了320张照相片,确实运转良好,看上去看病。 基本上,我不需要担心所有从serv头到serv的光头.,因为320部电离板,管理并重新安排了我的数据,所有这一切都是在幕后进行的。
当我开始注意到在320年实施的这一称为TTURLCache的魔法切割机制。 在标题档案中,我发现以下接口方法:
/**
* Stores a data on disk.
*/
- (void)storeData:(NSData*)data forURL:(NSString*)URL; //method 1
- (void)storeData:(NSData*)data forKey:(NSString*)key;
/**
* Stores an image in the memory cache.
*/
- (void)storeImage:(UIImage*)image forURL:(NSString*)URL; //method 2
/**
* Stores an etag value in the etag cache.
*/
- (void)storeEtag:(NSString*)etag forKey:(NSString*)key; //method 3
我的问题:
- Method 1 and method 2 in the above code: are they only capable of storing data, or are they capable of both fetching and storing?
- What is an etag in method 3?
- Method 1 says it will store the data on disk, while method 2 says it will store the image in memory. If I use method 2 to store an image, will it get lost once I kill and restart my app?
预示着很多事。