Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Olivier Poitrey committed Mar 16, 2010
0 parents commit a4bca7f
Show file tree
Hide file tree
Showing 7 changed files with 899 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# xcode noise
*.mode1v3
*.pbxuser
*.perspective
*.perspectivev3
*.pyc
*~.nib/
build/*

# Textmate - if you build your xcode projects with it
*.tm_build_errors

# osx noise
.DS_Store
profile
29 changes: 29 additions & 0 deletions SDURLCache.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//
// SDURLCache.h
// SDURLCache
//
// Created by Olivier Poitrey on 15/03/10.
// Copyright 2010 Dailymotion. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface SDURLCache : NSURLCache
{
@private
NSString *diskCachePath;
NSMutableDictionary *diskCacheInfo;
NSUInteger diskCacheUsage;
NSTimeInterval minCacheInterval;
NSOperationQueue *cacheInQueue;
}

/*
* Defines the minimum number of seconds between now and the expiration time of a cacheable response
* in order for the response to be cached on disk. This prevent from spending time and storage capacity
* for an entry which will certainly expire before behing read back from disk cache (memory cache is
* best suited for short term cache). The default value is set to 5 minutes (300 seconds).
*/
@property (nonatomic, assign) NSTimeInterval minCacheInterval;

@end
Loading

0 comments on commit a4bca7f

Please sign in to comment.