![]() |
Tuya iOS Smart Life App SDK 5.15.0
|
#import <ThingEncryptDiskCache.h>
Class Methods | |
(instancetype) | + UNAVAILABLE_ATTRIBUTE |
(nullable NSData *) | + getExtendedDataFromObject: |
(void) | + setExtendedData:toObject: |
(instancetype) | + UNAVAILABLE_ATTRIBUTE |
(nullable NSData *) | + getExtendedDataFromObject: |
(void) | + setExtendedData:toObject: |
(instancetype) | + UNAVAILABLE_ATTRIBUTE |
(nullable NSData *) | + getExtendedDataFromObject: |
(void) | + setExtendedData:toObject: |
(instancetype) | + UNAVAILABLE_ATTRIBUTE |
(nullable NSData *) | + getExtendedDataFromObject: |
(void) | + setExtendedData:toObject: |
Properties | |
NSString * | name |
NSString * | path |
NSString * | dataDirectory |
NSString *(^ | customFileNameBlock )(NSString *key) |
NSUInteger | countLimit |
NSUInteger | costLimit |
NSTimeInterval | ageLimit |
NSUInteger | freeDiskSpaceLimit |
NSTimeInterval | autoTrimInterval |
BOOL | errorLogsEnabled |
Definition at line 13 of file ThingEncryptDiskCache.h.
- (nullable NSString *) cachedFileNameForKey: | (nullable NSString *) | key |
When an object needs to be saved as a file, this function will be invoked to generate a file name use md5(key) as default file name.
- (nullable NSString *) cachedFileNameForKey: | (nullable NSString *) | key |
When an object needs to be saved as a file, this function will be invoked to generate a file name use md5(key) as default file name.
- (nullable NSString *) cachedFileNameForKey: | (nullable NSString *) | key |
When an object needs to be saved as a file, this function will be invoked to generate a file name use md5(key) as default file name.
- (nullable NSString *) cachedFileNameForKey: | (nullable NSString *) | key |
When an object needs to be saved as a file, this function will be invoked to generate a file name use md5(key) as default file name.
- (BOOL) containsObjectForKey: | (NSString *) | key |
=============================================================================
Returns a boolean value that indicates whether a given key is in cache. This method may blocks the calling thread until file read finished.
key | A string identifying the value. If nil, just return NO. |
- (BOOL) containsObjectForKey: | (NSString *) | key |
=============================================================================
Returns a boolean value that indicates whether a given key is in cache. This method may blocks the calling thread until file read finished.
key | A string identifying the value. If nil, just return NO. |
- (BOOL) containsObjectForKey: | (NSString *) | key |
=============================================================================
Returns a boolean value that indicates whether a given key is in cache. This method may blocks the calling thread until file read finished.
key | A string identifying the value. If nil, just return NO. |
- (BOOL) containsObjectForKey: | (NSString *) | key |
=============================================================================
Returns a boolean value that indicates whether a given key is in cache. This method may blocks the calling thread until file read finished.
key | A string identifying the value. If nil, just return NO. |
- (void) containsObjectForKey: | (NSString *) | key | |
withBlock: | (void(^)(NSString *key, BOOL contains)) | block | |
Returns a boolean value with the block that indicates whether a given key is in cache. This method returns immediately and invoke the passed block in background queue when the operation finished.
key | A string identifying the value. If nil, just return NO. |
block | A block which will be invoked in background queue when finished. |
- (void) containsObjectForKey: | (NSString *) | key | |
withBlock: | (void(^)(NSString *key, BOOL contains)) | block | |
Returns a boolean value with the block that indicates whether a given key is in cache. This method returns immediately and invoke the passed block in background queue when the operation finished.
key | A string identifying the value. If nil, just return NO. |
block | A block which will be invoked in background queue when finished. |
- (void) containsObjectForKey: | (NSString *) | key | |
withBlock: | (void(^)(NSString *key, BOOL contains)) | block | |
Returns a boolean value with the block that indicates whether a given key is in cache. This method returns immediately and invoke the passed block in background queue when the operation finished.
key | A string identifying the value. If nil, just return NO. |
block | A block which will be invoked in background queue when finished. |
- (void) containsObjectForKey: | (NSString *) | key | |
withBlock: | (void(^)(NSString *key, BOOL contains)) | block | |
Returns a boolean value with the block that indicates whether a given key is in cache. This method returns immediately and invoke the passed block in background queue when the operation finished.
key | A string identifying the value. If nil, just return NO. |
block | A block which will be invoked in background queue when finished. |
- (NSString *(^)) customFileNameBlock | (NSString *) | key |
When an object needs to be saved as a file, this block will be invoked to generate a file name for a specified key. If the block is nil, the cache use md5(key) as default file name.
The default value is nil.
- (NSString *(^)) customFileNameBlock | (NSString *) | key |
When an object needs to be saved as a file, this block will be invoked to generate a file name for a specified key. If the block is nil, the cache use md5(key) as default file name.
The default value is nil.
- (NSString *(^)) customFileNameBlock | (NSString *) | key |
When an object needs to be saved as a file, this block will be invoked to generate a file name for a specified key. If the block is nil, the cache use md5(key) as default file name.
The default value is nil.
+ (nullable NSData *) getExtendedDataFromObject: | (id) | object |
+ (nullable NSData *) getExtendedDataFromObject: | (id) | object |
+ (nullable NSData *) getExtendedDataFromObject: | (id) | object |
+ (nullable NSData *) getExtendedDataFromObject: | (id) | object |
- (nullable instancetype) initWithPath: | (NSString *) | NS_DESIGNATED_INITIALIZER |
Create a new cache based on the specified path.
path | Full path of a directory in which the cache will write data. Once initialized you should not read and write to this directory. |
- (nullable instancetype) initWithPath: | (NSString *) | NS_DESIGNATED_INITIALIZER |
Create a new cache based on the specified path.
path | Full path of a directory in which the cache will write data. Once initialized you should not read and write to this directory. |
- (nullable instancetype) initWithPath: | (NSString *) | NS_DESIGNATED_INITIALIZER |
Create a new cache based on the specified path.
path | Full path of a directory in which the cache will write data. Once initialized you should not read and write to this directory. |
- (nullable instancetype) initWithPath: | (NSString *) | NS_DESIGNATED_INITIALIZER |
Create a new cache based on the specified path.
path | Full path of a directory in which the cache will write data. Once initialized you should not read and write to this directory. |
- (nullable id< NSCoding >) objectForKey: | (NSString *) | key |
Returns the value associated with a given key. This method may blocks the calling thread until file read finished.
key | A string identifying the value. If nil, just return nil. |
- (nullable id< NSCoding >) objectForKey: | (NSString *) | key |
Returns the value associated with a given key. This method may blocks the calling thread until file read finished.
key | A string identifying the value. If nil, just return nil. |
- (nullable id< NSCoding >) objectForKey: | (NSString *) | key |
Returns the value associated with a given key. This method may blocks the calling thread until file read finished.
key | A string identifying the value. If nil, just return nil. |
- (nullable id< NSCoding >) objectForKey: | (NSString *) | key |
Returns the value associated with a given key. This method may blocks the calling thread until file read finished.
key | A string identifying the value. If nil, just return nil. |
- (void) objectForKey: | (NSString *) | key | |
withBlock: | (void(^)(NSString *key, id< NSCoding > _Nullable object)) | block | |
Returns the value associated with a given key. This method returns immediately and invoke the passed block in background queue when the operation finished.
key | A string identifying the value. If nil, just return nil. |
block | A block which will be invoked in background queue when finished. |
- (void) objectForKey: | (NSString *) | key | |
withBlock: | (void(^)(NSString *key, id< NSCoding > _Nullable object)) | block | |
Returns the value associated with a given key. This method returns immediately and invoke the passed block in background queue when the operation finished.
key | A string identifying the value. If nil, just return nil. |
block | A block which will be invoked in background queue when finished. |
- (void) objectForKey: | (NSString *) | key | |
withBlock: | (void(^)(NSString *key, id< NSCoding > _Nullable object)) | block | |
Returns the value associated with a given key. This method returns immediately and invoke the passed block in background queue when the operation finished.
key | A string identifying the value. If nil, just return nil. |
block | A block which will be invoked in background queue when finished. |
- (void) objectForKey: | (NSString *) | key | |
withBlock: | (void(^)(NSString *key, id< NSCoding > _Nullable object)) | block | |
Returns the value associated with a given key. This method returns immediately and invoke the passed block in background queue when the operation finished.
key | A string identifying the value. If nil, just return nil. |
block | A block which will be invoked in background queue when finished. |
- (void) removeAllObjects |
Empties the cache. This method may blocks the calling thread until file delete finished.
- (void) removeAllObjects |
Empties the cache. This method may blocks the calling thread until file delete finished.
- (void) removeAllObjects |
Empties the cache. This method may blocks the calling thread until file delete finished.
- (void) removeAllObjects |
Empties the cache. This method may blocks the calling thread until file delete finished.
- (void) removeAllObjectsWithBlock: | (void(^)(void)) | block |
Empties the cache. This method returns immediately and invoke the passed block in background queue when the operation finished.
block | A block which will be invoked in background queue when finished. |
- (void) removeAllObjectsWithBlock: | (void(^)(void)) | block |
Empties the cache. This method returns immediately and invoke the passed block in background queue when the operation finished.
block | A block which will be invoked in background queue when finished. |
- (void) removeAllObjectsWithBlock: | (void(^)(void)) | block |
Empties the cache. This method returns immediately and invoke the passed block in background queue when the operation finished.
block | A block which will be invoked in background queue when finished. |
- (void) removeAllObjectsWithBlock: | (void(^)(void)) | block |
Empties the cache. This method returns immediately and invoke the passed block in background queue when the operation finished.
block | A block which will be invoked in background queue when finished. |
- (void) removeObjectForKey: | (NSString *) | key |
Removes the value of the specified key in the cache. This method may blocks the calling thread until file delete finished.
key | The key identifying the value to be removed. If nil, this method has no effect. |
- (void) removeObjectForKey: | (NSString *) | key |
Removes the value of the specified key in the cache. This method may blocks the calling thread until file delete finished.
key | The key identifying the value to be removed. If nil, this method has no effect. |
- (void) removeObjectForKey: | (NSString *) | key |
Removes the value of the specified key in the cache. This method may blocks the calling thread until file delete finished.
key | The key identifying the value to be removed. If nil, this method has no effect. |
- (void) removeObjectForKey: | (NSString *) | key |
Removes the value of the specified key in the cache. This method may blocks the calling thread until file delete finished.
key | The key identifying the value to be removed. If nil, this method has no effect. |
- (void) removeObjectForKey: | (NSString *) | key | |
withBlock: | (void(^)(NSString *key)) | block | |
Removes the value of the specified key in the cache. This method returns immediately and invoke the passed block in background queue when the operation finished.
key | The key identifying the value to be removed. If nil, this method has no effect. |
block | A block which will be invoked in background queue when finished. |
- (void) removeObjectForKey: | (NSString *) | key | |
withBlock: | (void(^)(NSString *key)) | block | |
Removes the value of the specified key in the cache. This method returns immediately and invoke the passed block in background queue when the operation finished.
key | The key identifying the value to be removed. If nil, this method has no effect. |
block | A block which will be invoked in background queue when finished. |
- (void) removeObjectForKey: | (NSString *) | key | |
withBlock: | (void(^)(NSString *key)) | block | |
Removes the value of the specified key in the cache. This method returns immediately and invoke the passed block in background queue when the operation finished.
key | The key identifying the value to be removed. If nil, this method has no effect. |
block | A block which will be invoked in background queue when finished. |
- (void) removeObjectForKey: | (NSString *) | key | |
withBlock: | (void(^)(NSString *key)) | block | |
Removes the value of the specified key in the cache. This method returns immediately and invoke the passed block in background queue when the operation finished.
key | The key identifying the value to be removed. If nil, this method has no effect. |
block | A block which will be invoked in background queue when finished. |
- (void) removeObjectsAtPath: | (NSString *) | path |
Remove all items under the given path in background queue.
- (void) removeObjectsAtPath: | (NSString *) | path |
Remove all items under the given path in background queue.
- (void) removeObjectsAtPath: | (NSString *) | path |
Remove all items under the given path in background queue.
- (void) removeObjectsAtPath: | (NSString *) | path |
Remove all items under the given path in background queue.
+ (void) setExtendedData: | (nullable NSData *) | extendedData | |
toObject: | (id) | object | |
Set extended data to an object.
@discussion You can set any extended data to an object before you save the object to disk cache. The extended data will also be saved with this object. You can get the extended data later with "getExtendedDataFromObject:".
extendedData | The extended data (pass nil to remove). |
object | The object. |
+ (void) setExtendedData: | (nullable NSData *) | extendedData | |
toObject: | (id) | object | |
Set extended data to an object.
@discussion You can set any extended data to an object before you save the object to disk cache. The extended data will also be saved with this object. You can get the extended data later with "getExtendedDataFromObject:".
extendedData | The extended data (pass nil to remove). |
object | The object. |
+ (void) setExtendedData: | (nullable NSData *) | extendedData | |
toObject: | (id) | object | |
Set extended data to an object.
@discussion You can set any extended data to an object before you save the object to disk cache. The extended data will also be saved with this object. You can get the extended data later with "getExtendedDataFromObject:".
extendedData | The extended data (pass nil to remove). |
object | The object. |
+ (void) setExtendedData: | (nullable NSData *) | extendedData | |
toObject: | (id) | object | |
Set extended data to an object.
@discussion You can set any extended data to an object before you save the object to disk cache. The extended data will also be saved with this object. You can get the extended data later with "getExtendedDataFromObject:".
extendedData | The extended data (pass nil to remove). |
object | The object. |
- (void) setObject: | (nullable id< NSCoding >) | object | |
forKey: | (NSString *) | key | |
Sets the value of the specified key in the cache. This method may blocks the calling thread until file write finished.
object | The object to be stored in the cache. If nil, it calls removeObjectForKey: . |
key | The key with which to associate the value. If nil, this method has no effect. |
- (void) setObject: | (nullable id< NSCoding >) | object | |
forKey: | (NSString *) | key | |
Sets the value of the specified key in the cache. This method may blocks the calling thread until file write finished.
object | The object to be stored in the cache. If nil, it calls removeObjectForKey: . |
key | The key with which to associate the value. If nil, this method has no effect. |
- (void) setObject: | (nullable id< NSCoding >) | object | |
forKey: | (NSString *) | key | |
Sets the value of the specified key in the cache. This method may blocks the calling thread until file write finished.
object | The object to be stored in the cache. If nil, it calls removeObjectForKey: . |
key | The key with which to associate the value. If nil, this method has no effect. |
- (void) setObject: | (nullable id< NSCoding >) | object | |
forKey: | (NSString *) | key | |
Sets the value of the specified key in the cache. This method may blocks the calling thread until file write finished.
object | The object to be stored in the cache. If nil, it calls removeObjectForKey: . |
key | The key with which to associate the value. If nil, this method has no effect. |
- (void) setObject: | (nullable id< NSCoding >) | object | |
forKey: | (NSString *) | key | |
withBlock: | (void(^)(void)) | block | |
Sets the value of the specified key in the cache. This method returns immediately and invoke the passed block in background queue when the operation finished.
object | The object to be stored in the cache. If nil, it calls removeObjectForKey: . |
block | A block which will be invoked in background queue when finished. |
- (void) setObject: | (nullable id< NSCoding >) | object | |
forKey: | (NSString *) | key | |
withBlock: | (void(^)(void)) | block | |
Sets the value of the specified key in the cache. This method returns immediately and invoke the passed block in background queue when the operation finished.
object | The object to be stored in the cache. If nil, it calls removeObjectForKey: . |
block | A block which will be invoked in background queue when finished. |
- (void) setObject: | (nullable id< NSCoding >) | object | |
forKey: | (NSString *) | key | |
withBlock: | (void(^)(void)) | block | |
Sets the value of the specified key in the cache. This method returns immediately and invoke the passed block in background queue when the operation finished.
object | The object to be stored in the cache. If nil, it calls removeObjectForKey: . |
block | A block which will be invoked in background queue when finished. |
- (void) setObject: | (nullable id< NSCoding >) | object | |
forKey: | (NSString *) | key | |
withBlock: | (void(^)(void)) | block | |
Sets the value of the specified key in the cache. This method returns immediately and invoke the passed block in background queue when the operation finished.
object | The object to be stored in the cache. If nil, it calls removeObjectForKey: . |
block | A block which will be invoked in background queue when finished. |
- (NSInteger) totalCost |
Returns the total cost (in bytes) of objects in this cache. This method may blocks the calling thread until file read finished.
- (NSInteger) totalCost |
Returns the total cost (in bytes) of objects in this cache. This method may blocks the calling thread until file read finished.
- (NSInteger) totalCost |
Returns the total cost (in bytes) of objects in this cache. This method may blocks the calling thread until file read finished.
- (NSInteger) totalCost |
Returns the total cost (in bytes) of objects in this cache. This method may blocks the calling thread until file read finished.
- (void) totalCostWithBlock: | (void(^)(NSInteger totalCost)) | block |
Get the total cost (in bytes) of objects in this cache. This method returns immediately and invoke the passed block in background queue when the operation finished.
block | A block which will be invoked in background queue when finished. |
- (void) totalCostWithBlock: | (void(^)(NSInteger totalCost)) | block |
Get the total cost (in bytes) of objects in this cache. This method returns immediately and invoke the passed block in background queue when the operation finished.
block | A block which will be invoked in background queue when finished. |
- (void) totalCostWithBlock: | (void(^)(NSInteger totalCost)) | block |
Get the total cost (in bytes) of objects in this cache. This method returns immediately and invoke the passed block in background queue when the operation finished.
block | A block which will be invoked in background queue when finished. |
- (void) totalCostWithBlock: | (void(^)(NSInteger totalCost)) | block |
Get the total cost (in bytes) of objects in this cache. This method returns immediately and invoke the passed block in background queue when the operation finished.
block | A block which will be invoked in background queue when finished. |
- (NSInteger) totalCount |
Returns the number of objects in this cache. This method may blocks the calling thread until file read finished.
- (NSInteger) totalCount |
Returns the number of objects in this cache. This method may blocks the calling thread until file read finished.
- (NSInteger) totalCount |
Returns the number of objects in this cache. This method may blocks the calling thread until file read finished.
- (NSInteger) totalCount |
Returns the number of objects in this cache. This method may blocks the calling thread until file read finished.
- (void) totalCountWithBlock: | (void(^)(NSInteger totalCount)) | block |
Get the number of objects in this cache. This method returns immediately and invoke the passed block in background queue when the operation finished.
block | A block which will be invoked in background queue when finished. |
- (void) totalCountWithBlock: | (void(^)(NSInteger totalCount)) | block |
Get the number of objects in this cache. This method returns immediately and invoke the passed block in background queue when the operation finished.
block | A block which will be invoked in background queue when finished. |
- (void) totalCountWithBlock: | (void(^)(NSInteger totalCount)) | block |
Get the number of objects in this cache. This method returns immediately and invoke the passed block in background queue when the operation finished.
block | A block which will be invoked in background queue when finished. |
- (void) totalCountWithBlock: | (void(^)(NSInteger totalCount)) | block |
Get the number of objects in this cache. This method returns immediately and invoke the passed block in background queue when the operation finished.
block | A block which will be invoked in background queue when finished. |
- (void) trimToAge: | (NSTimeInterval) | age |
Removes objects from the cache use LRU, until all expiry objects removed by the specified value. This method may blocks the calling thread until operation finished.
age | The maximum age of the object. |
- (void) trimToAge: | (NSTimeInterval) | age |
Removes objects from the cache use LRU, until all expiry objects removed by the specified value. This method may blocks the calling thread until operation finished.
age | The maximum age of the object. |
- (void) trimToAge: | (NSTimeInterval) | age |
Removes objects from the cache use LRU, until all expiry objects removed by the specified value. This method may blocks the calling thread until operation finished.
age | The maximum age of the object. |
- (void) trimToAge: | (NSTimeInterval) | age |
Removes objects from the cache use LRU, until all expiry objects removed by the specified value. This method may blocks the calling thread until operation finished.
age | The maximum age of the object. |
- (void) trimToAge: | (NSTimeInterval) | age | |
withBlock: | (void(^)(void)) | block | |
Removes objects from the cache use LRU, until all expiry objects removed by the specified value. This method returns immediately and invoke the passed block in background queue when the operation finished.
age | The maximum age of the object. |
block | A block which will be invoked in background queue when finished. |
- (void) trimToAge: | (NSTimeInterval) | age | |
withBlock: | (void(^)(void)) | block | |
Removes objects from the cache use LRU, until all expiry objects removed by the specified value. This method returns immediately and invoke the passed block in background queue when the operation finished.
age | The maximum age of the object. |
block | A block which will be invoked in background queue when finished. |
- (void) trimToAge: | (NSTimeInterval) | age | |
withBlock: | (void(^)(void)) | block | |
Removes objects from the cache use LRU, until all expiry objects removed by the specified value. This method returns immediately and invoke the passed block in background queue when the operation finished.
age | The maximum age of the object. |
block | A block which will be invoked in background queue when finished. |
- (void) trimToAge: | (NSTimeInterval) | age | |
withBlock: | (void(^)(void)) | block | |
Removes objects from the cache use LRU, until all expiry objects removed by the specified value. This method returns immediately and invoke the passed block in background queue when the operation finished.
age | The maximum age of the object. |
block | A block which will be invoked in background queue when finished. |
- (void) trimToCost: | (NSUInteger) | cost |
=============================================================================
Removes objects from the cache use LRU, until the totalCost
is below the specified value. This method may blocks the calling thread until operation finished.
cost | The total cost allowed to remain after the cache has been trimmed. |
- (void) trimToCost: | (NSUInteger) | cost |
=============================================================================
Removes objects from the cache use LRU, until the totalCost
is below the specified value. This method may blocks the calling thread until operation finished.
cost | The total cost allowed to remain after the cache has been trimmed. |
- (void) trimToCost: | (NSUInteger) | cost |
=============================================================================
Removes objects from the cache use LRU, until the totalCost
is below the specified value. This method may blocks the calling thread until operation finished.
cost | The total cost allowed to remain after the cache has been trimmed. |
- (void) trimToCost: | (NSUInteger) | cost |
=============================================================================
Removes objects from the cache use LRU, until the totalCost
is below the specified value. This method may blocks the calling thread until operation finished.
cost | The total cost allowed to remain after the cache has been trimmed. |
- (void) trimToCost: | (NSUInteger) | cost | |
withBlock: | (void(^)(void)) | block | |
Removes objects from the cache use LRU, until the totalCost
is below the specified value. This method returns immediately and invoke the passed block in background queue when the operation finished.
cost | The total cost allowed to remain after the cache has been trimmed. |
block | A block which will be invoked in background queue when finished. |
- (void) trimToCost: | (NSUInteger) | cost | |
withBlock: | (void(^)(void)) | block | |
Removes objects from the cache use LRU, until the totalCost
is below the specified value. This method returns immediately and invoke the passed block in background queue when the operation finished.
cost | The total cost allowed to remain after the cache has been trimmed. |
block | A block which will be invoked in background queue when finished. |
- (void) trimToCost: | (NSUInteger) | cost | |
withBlock: | (void(^)(void)) | block | |
Removes objects from the cache use LRU, until the totalCost
is below the specified value. This method returns immediately and invoke the passed block in background queue when the operation finished.
cost | The total cost allowed to remain after the cache has been trimmed. |
block | A block which will be invoked in background queue when finished. |
- (void) trimToCost: | (NSUInteger) | cost | |
withBlock: | (void(^)(void)) | block | |
Removes objects from the cache use LRU, until the totalCost
is below the specified value. This method returns immediately and invoke the passed block in background queue when the operation finished.
cost | The total cost allowed to remain after the cache has been trimmed. |
block | A block which will be invoked in background queue when finished. |
+ (instancetype) UNAVAILABLE_ATTRIBUTE |
- (instancetype) UNAVAILABLE_ATTRIBUTE |
- (instancetype) UNAVAILABLE_ATTRIBUTE |
+ (instancetype) UNAVAILABLE_ATTRIBUTE |
+ (instancetype) UNAVAILABLE_ATTRIBUTE |
- (instancetype) UNAVAILABLE_ATTRIBUTE |
+ (instancetype) UNAVAILABLE_ATTRIBUTE |
- (instancetype) UNAVAILABLE_ATTRIBUTE |
|
readwriteatomic |
The maximum expiry time of objects in cache.
@discussion The default value is DBL_MAX, which means no limit. This is not a strict limit — if an object goes over the limit, the objects could be evicted later in background queue.
Definition at line 70 of file ThingEncryptDiskCache.h.
|
readwriteatomic |
The auto trim check time interval in seconds. Default is 60 (1 minute).
@discussion The cache holds an internal timer to check whether the cache reaches its limits, and if the limit is reached, it begins to evict objects.
Definition at line 88 of file ThingEncryptDiskCache.h.
|
readwriteatomic |
The maximum total cost that the cache can hold before it starts evicting objects.
@discussion The default value is NSUIntegerMax, which means no limit. This is not a strict limit — if the cache goes over the limit, some objects in the cache could be evicted later in background queue.
Definition at line 61 of file ThingEncryptDiskCache.h.
|
readwriteatomic |
=============================================================================
The maximum number of objects the cache should hold.
@discussion The default value is NSUIntegerMax, which means no limit. This is not a strict limit — if the cache goes over the limit, some objects in the cache could be evicted later in background queue.
=============================================================================
The maximum number of objects the cache should hold.
@discussion The default value is NSUIntegerMax, which means no limit. This is not a strict limit — if the cache goes over the limit, some objects in the cache could be evicted later in background queue.
=============================================================================
The maximum number of objects the cache should hold.
@discussion The default value is NSUIntegerMax, which means no limit. This is not a strict limit — if the cache goes over the limit, some objects in the cache could be evicted later in background queue.
=============================================================================
The maximum number of objects the cache should hold.
@discussion The default value is NSUIntegerMax, which means no limit. This is not a strict limit — if the cache goes over the limit, some objects in the cache could be evicted later in background queue.
Definition at line 52 of file ThingEncryptDiskCache.h.
|
readwriteatomiccopy |
When an object needs to be saved as a file, this block will be invoked to generate a file name for a specified key. If the block is nil, the cache use md5(key) as default file name.
The default value is nil.
|
readatomicassign |
The path of the cache data (read-only).
Definition at line 27 of file ThingEncryptDiskCache.h.
|
readwriteatomic |
Set YES
to enable error logs for debug.
Definition at line 93 of file ThingEncryptDiskCache.h.
|
readwriteatomic |
The minimum free disk space (in bytes) which the cache should kept.
@discussion The default value is 0, which means no limit. If the free disk space is lower than this value, the cache will remove objects to free some disk space. This is not a strict limit—if the free disk space goes over the limit, the objects could be evicted later in background queue.
Definition at line 80 of file ThingEncryptDiskCache.h.
|
readwriteatomiccopy |
=============================================================================
The name of the cache. Default is nil.
=============================================================================
The name of the cache. Default is nil.
=============================================================================
The name of the cache. Default is nil.
=============================================================================
The name of the cache. Default is nil.
Definition at line 21 of file ThingEncryptDiskCache.h.
|
readatomicassign |
The path of the cache (read-only).
Definition at line 24 of file ThingEncryptDiskCache.h.