-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathSGCachePrivate.h
38 lines (27 loc) · 1013 Bytes
/
SGCachePrivate.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//
// SGCachePrivate.h
// Pods
//
// Created by James Van-As on 6/05/15.
//
//
#ifndef Pods_SGCachePrivate_h
#define Pods_SGCachePrivate_h
void backgroundDo(void(^block)(void));
@class SGCacheTask;
@interface SGCache ()
@property (atomic, copy) NSString *folderName;
@property (atomic, copy) NSString *cachePath;
+ (SGCache *)cache;
- (NSString *)makeCachePath;
- (NSString *)pathForCacheKey:(NSString *)cacheKey;
- (NSString *)pathForURL:(NSString *)url requestHeaders:(NSDictionary *)headers;
- (NSString *)cacheKeyFor:(NSString *)url requestHeaders:(NSDictionary *)headers;
+ (SGCacheTask *)existingSlowQueueTaskFor:(NSString *)cacheKey;
+ (SGCacheTask *)existingFastQueueTaskFor:(NSString *)cacheKey;
+ (void)taskFailed:(SGCacheTask *)task;
+ (SGCacheTask *)taskForPromise:(SGCachePromise *)promise;
+ (void)addRetryForPromise:(SGCachePromise *)promise retryBlock:(SGCacheFetchOnRetry)retry;
+ (void)addFailForPromise:(SGCachePromise *)promise failBlock:(SGCacheFetchFail)failBlock;
@end
#endif