Skip to content

Commit

Permalink
Removing AFURLCache, using NSURLCache instead
Browse files Browse the repository at this point in the history
  • Loading branch information
mattt committed Jun 2, 2011
1 parent 9958139 commit 3f851b0
Show file tree
Hide file tree
Showing 11 changed files with 2,648 additions and 2,443 deletions.
3 changes: 1 addition & 2 deletions AFNetworking/AFImageRequestOperation.m
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
// THE SOFTWARE.

#import "AFImageRequestOperation.h"
#import "AFURLCache.h"

#import "UIImage+AFNetworking.h"

Expand Down Expand Up @@ -119,7 +118,7 @@ - (void)finishWithError:(NSError *)error {
}
NSURLResponse *response = [[[NSURLResponse alloc] initWithURL:[self.lastRequest URL] MIMEType:[self.lastResponse MIMEType] expectedContentLength:[processedImageData length] textEncodingName:[self.lastResponse textEncodingName]] autorelease];
NSCachedURLResponse *cachedResponse = [[[NSCachedURLResponse alloc] initWithResponse:response data:processedImageData] autorelease];
[[AFURLCache sharedURLCache] storeCachedResponse:cachedResponse forRequest:self.lastRequest];
[[NSURLCache sharedURLCache] storeCachedResponse:cachedResponse forRequest:self.lastRequest];
[pool drain];
}
}
Expand Down
2 changes: 0 additions & 2 deletions AFNetworking/AFRestClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
@end

@interface AFRestClient : NSObject <AFRestClient>
+ (id)sharedClient;

- (NSString *)defaultValueForHeader:(NSString *)header;
- (void)setDefaultHeader:(NSString *)header value:(NSString *)value;
- (void)setAuthorizationHeaderWithToken:(NSString *)token;
Expand Down
11 changes: 0 additions & 11 deletions AFNetworking/AFRestClient.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#import "AFHTTPOperation.h"

static NSStringEncoding const kAFRestClientStringEncoding = NSUTF8StringEncoding;
static AFRestClient *_sharedClient = nil;

@interface AFRestClient ()
@property (readwrite, nonatomic, retain) NSMutableDictionary *defaultHeaders;
Expand All @@ -35,16 +34,6 @@ @implementation AFRestClient
@synthesize defaultHeaders = _defaultHeaders;
@synthesize operationQueue = _operationQueue;

+ (id)sharedClient {
if (_sharedClient == nil) {
@synchronized(self) {
_sharedClient = [[self alloc] init];
}
}

return _sharedClient;
}

- (id)init {
self = [super init];
if (!self) {
Expand Down
39 changes: 0 additions & 39 deletions AFNetworking/AFURLCache.h

This file was deleted.

159 changes: 0 additions & 159 deletions AFNetworking/AFURLCache.m

This file was deleted.

6 changes: 0 additions & 6 deletions Example/AFNetworking Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
F8DA09DA1396ABED0057D0CC /* AFHTTPOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = F8D25CF11396A98600CF3BD6 /* AFHTTPOperation.m */; };
F8DA09DB1396ABED0057D0CC /* AFImageRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = F8D25CF21396A98600CF3BD6 /* AFImageRequestOperation.m */; };
F8DA09DC1396ABED0057D0CC /* AFRestClient.m in Sources */ = {isa = PBXBuildFile; fileRef = F8D25CF31396A98600CF3BD6 /* AFRestClient.m */; };
F8DA09DD1396ABED0057D0CC /* AFURLCache.m in Sources */ = {isa = PBXBuildFile; fileRef = F8D25CF41396A98600CF3BD6 /* AFURLCache.m */; };
F8DA09DE1396ABED0057D0CC /* UIImage+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = F8D25CF51396A98600CF3BD6 /* UIImage+AFNetworking.m */; };
F8DA09DF1396ABED0057D0CC /* QHTTPOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = F8D25D0A1396A9A900CF3BD6 /* QHTTPOperation.m */; };
F8DA09E01396ABED0057D0CC /* QRunLoopOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = F8D25D0C1396A9A900CF3BD6 /* QRunLoopOperation.m */; };
Expand All @@ -37,13 +36,11 @@
F8D25CEB1396A98600CF3BD6 /* AFHTTPOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AFHTTPOperation.h; path = ../AFNetworking/AFHTTPOperation.h; sourceTree = "<group>"; };
F8D25CEC1396A98600CF3BD6 /* AFImageRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AFImageRequestOperation.h; path = ../AFNetworking/AFImageRequestOperation.h; sourceTree = "<group>"; };
F8D25CED1396A98600CF3BD6 /* AFRestClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AFRestClient.h; path = ../AFNetworking/AFRestClient.h; sourceTree = "<group>"; };
F8D25CEE1396A98600CF3BD6 /* AFURLCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AFURLCache.h; path = ../AFNetworking/AFURLCache.h; sourceTree = "<group>"; };
F8D25CEF1396A98600CF3BD6 /* UIImage+AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIImage+AFNetworking.h"; path = "../AFNetworking/UIImage+AFNetworking.h"; sourceTree = "<group>"; };
F8D25CF01396A98600CF3BD6 /* AFCallback.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AFCallback.m; path = ../AFNetworking/AFCallback.m; sourceTree = "<group>"; };
F8D25CF11396A98600CF3BD6 /* AFHTTPOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AFHTTPOperation.m; path = ../AFNetworking/AFHTTPOperation.m; sourceTree = "<group>"; };
F8D25CF21396A98600CF3BD6 /* AFImageRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AFImageRequestOperation.m; path = ../AFNetworking/AFImageRequestOperation.m; sourceTree = "<group>"; };
F8D25CF31396A98600CF3BD6 /* AFRestClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AFRestClient.m; path = ../AFNetworking/AFRestClient.m; sourceTree = "<group>"; };
F8D25CF41396A98600CF3BD6 /* AFURLCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AFURLCache.m; path = ../AFNetworking/AFURLCache.m; sourceTree = "<group>"; };
F8D25CF51396A98600CF3BD6 /* UIImage+AFNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIImage+AFNetworking.m"; path = "../AFNetworking/UIImage+AFNetworking.m"; sourceTree = "<group>"; };
F8D25D091396A9A900CF3BD6 /* QHTTPOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QHTTPOperation.h; sourceTree = "<group>"; };
F8D25D0A1396A9A900CF3BD6 /* QHTTPOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QHTTPOperation.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -237,8 +234,6 @@
F8D25CF21396A98600CF3BD6 /* AFImageRequestOperation.m */,
F8D25CED1396A98600CF3BD6 /* AFRestClient.h */,
F8D25CF31396A98600CF3BD6 /* AFRestClient.m */,
F8D25CEE1396A98600CF3BD6 /* AFURLCache.h */,
F8D25CF41396A98600CF3BD6 /* AFURLCache.m */,
F8D25CEF1396A98600CF3BD6 /* UIImage+AFNetworking.h */,
F8D25CF51396A98600CF3BD6 /* UIImage+AFNetworking.m */,
);
Expand Down Expand Up @@ -337,7 +332,6 @@
F8DA09DA1396ABED0057D0CC /* AFHTTPOperation.m in Sources */,
F8DA09DB1396ABED0057D0CC /* AFImageRequestOperation.m in Sources */,
F8DA09DC1396ABED0057D0CC /* AFRestClient.m in Sources */,
F8DA09DD1396ABED0057D0CC /* AFURLCache.m in Sources */,
F8DA09DE1396ABED0057D0CC /* UIImage+AFNetworking.m in Sources */,
F8DA09DF1396ABED0057D0CC /* QHTTPOperation.m in Sources */,
F8DA09E01396ABED0057D0CC /* QRunLoopOperation.m in Sources */,
Expand Down
Loading

0 comments on commit 3f851b0

Please sign in to comment.