配合后台做简单的缓存数据

 NSString *path = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)[0];

    NSString *strrrrr = [path stringByAppendingPathComponent:@"archive"];

 

   //从本地读缓存文件

                NSData *data = [NSData dataWithContentsOfFile:strrrrr];

               NSDictionary *dictionary0 = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:nil];

                

 // 写入文件

   NSData *fdata = [operation.responseString dataUsingEncoding:NSUTF8StringEncoding];

            

            [fdata writeToFile:strrrrr atomically:YES];