#import <ThingEncryptImageCache.h>
Definition at line 29 of file ThingEncryptImageCache.h.
◆ cachePathForKey:inPath: [1/4]
- (nullable NSString *) cachePathForKey: |
|
(nullable NSString *) |
key |
inPath: |
|
(nonnull NSString *) |
path |
|
|
| |
Get the cache path for a certain key (needs the cache path root folder)
- Parameters
-
key | the key (can be obtained from url using cacheKeyForURL) |
path | the cache path root folder |
- Returns
- the cache path
◆ cachePathForKey:inPath: [2/4]
- (nullable NSString *) cachePathForKey: |
|
(nullable NSString *) |
key |
inPath: |
|
(nonnull NSString *) |
path |
|
|
| |
Get the cache path for a certain key (needs the cache path root folder)
- Parameters
-
key | the key (can be obtained from url using cacheKeyForURL) |
path | the cache path root folder |
- Returns
- the cache path
◆ cachePathForKey:inPath: [3/4]
- (nullable NSString *) cachePathForKey: |
|
(nullable NSString *) |
key |
inPath: |
|
(nonnull NSString *) |
path |
|
|
| |
Get the cache path for a certain key (needs the cache path root folder)
- Parameters
-
key | the key (can be obtained from url using cacheKeyForURL) |
path | the cache path root folder |
- Returns
- the cache path
◆ cachePathForKey:inPath: [4/4]
- (nullable NSString *) cachePathForKey: |
|
(nullable NSString *) |
key |
inPath: |
|
(nonnull NSString *) |
path |
|
|
| |
Get the cache path for a certain key (needs the cache path root folder)
- Parameters
-
key | the key (can be obtained from url using cacheKeyForURL) |
path | the cache path root folder |
- Returns
- the cache path
◆ clearAllCache [1/4]
Clear all cache, include memory and disk.
◆ clearAllCache [2/4]
Clear all cache, include memory and disk.
◆ clearAllCache [3/4]
Clear all cache, include memory and disk.
◆ clearAllCache [4/4]
Clear all cache, include memory and disk.
◆ clearDiskFromSDWebImage [1/4]
- (void) clearDiskFromSDWebImage |
|
|
|
Clear the disk cache from SDWebImage. Use this method to clear the history cache data, if you are migrating from SDWebImage. Only clear the data cache by sharedImageCache instance of SDImageCache, not include the specific cache path.
◆ clearDiskFromSDWebImage [2/4]
- (void) clearDiskFromSDWebImage |
|
|
|
Clear the disk cache from SDWebImage. Use this method to clear the history cache data, if you are migrating from SDWebImage. Only clear the data cache by sharedImageCache instance of SDImageCache, not include the specific cache path.
◆ clearDiskFromSDWebImage [3/4]
- (void) clearDiskFromSDWebImage |
|
|
|
Clear the disk cache from SDWebImage. Use this method to clear the history cache data, if you are migrating from SDWebImage. Only clear the data cache by sharedImageCache instance of SDImageCache, not include the specific cache path.
◆ clearDiskFromSDWebImage [4/4]
- (void) clearDiskFromSDWebImage |
|
|
|
Clear the disk cache from SDWebImage. Use this method to clear the history cache data, if you are migrating from SDWebImage. Only clear the data cache by sharedImageCache instance of SDImageCache, not include the specific cache path.
◆ clearDiskOnCompletion: [1/4]
- (void) clearDiskOnCompletion: |
|
(void(^)(void)) |
completion |
|
Clear all disk cache.
- Parameters
-
completion | A completion block which will be called on main thread. |
◆ clearDiskOnCompletion: [2/4]
- (void) clearDiskOnCompletion: |
|
(void(^)(void)) |
completion |
|
Clear all disk cache.
- Parameters
-
completion | A completion block which will be called on main thread. |
◆ clearDiskOnCompletion: [3/4]
- (void) clearDiskOnCompletion: |
|
(void(^)(void)) |
completion |
|
Clear all disk cache.
- Parameters
-
completion | A completion block which will be called on main thread. |
◆ clearDiskOnCompletion: [4/4]
- (void) clearDiskOnCompletion: |
|
(void(^)(void)) |
completion |
|
Clear all disk cache.
- Parameters
-
completion | A completion block which will be called on main thread. |
◆ clearMemory [1/4]
◆ clearMemory [2/4]
◆ clearMemory [3/4]
◆ clearMemory [4/4]
◆ containsImageForKey: [1/4]
- (BOOL) containsImageForKey: |
|
(NSString *) |
key |
|
Returns a Boolean value that indicates whether a given key is in cache. If the image is not in memory, this method may blocks the calling thread until file read finished.
- Parameters
-
key | A string identifying the image. If nil, just return NO. |
- Returns
- Whether the image is in cache.
◆ containsImageForKey: [2/4]
- (BOOL) containsImageForKey: |
|
(NSString *) |
key |
|
Returns a Boolean value that indicates whether a given key is in cache. If the image is not in memory, this method may blocks the calling thread until file read finished.
- Parameters
-
key | A string identifying the image. If nil, just return NO. |
- Returns
- Whether the image is in cache.
◆ containsImageForKey: [3/4]
- (BOOL) containsImageForKey: |
|
(NSString *) |
key |
|
Returns a Boolean value that indicates whether a given key is in cache. If the image is not in memory, this method may blocks the calling thread until file read finished.
- Parameters
-
key | A string identifying the image. If nil, just return NO. |
- Returns
- Whether the image is in cache.
◆ containsImageForKey: [4/4]
- (BOOL) containsImageForKey: |
|
(NSString *) |
key |
|
Returns a Boolean value that indicates whether a given key is in cache. If the image is not in memory, this method may blocks the calling thread until file read finished.
- Parameters
-
key | A string identifying the image. If nil, just return NO. |
- Returns
- Whether the image is in cache.
◆ containsImageForKey:withType: [1/4]
Returns a Boolean value that indicates whether a given key is in cache. If the image is not in memory and the type
contains YYImageCacheTypeDisk
, this method may blocks the calling thread until file read finished.
- Parameters
-
key | A string identifying the image. If nil, just return NO. |
type | The cache type. |
- Returns
- Whether the image is in cache.
◆ containsImageForKey:withType: [2/4]
Returns a Boolean value that indicates whether a given key is in cache. If the image is not in memory and the type
contains YYImageCacheTypeDisk
, this method may blocks the calling thread until file read finished.
- Parameters
-
key | A string identifying the image. If nil, just return NO. |
type | The cache type. |
- Returns
- Whether the image is in cache.
◆ containsImageForKey:withType: [3/4]
Returns a Boolean value that indicates whether a given key is in cache. If the image is not in memory and the type
contains YYImageCacheTypeDisk
, this method may blocks the calling thread until file read finished.
- Parameters
-
key | A string identifying the image. If nil, just return NO. |
type | The cache type. |
- Returns
- Whether the image is in cache.
◆ containsImageForKey:withType: [4/4]
Returns a Boolean value that indicates whether a given key is in cache. If the image is not in memory and the type
contains YYImageCacheTypeDisk
, this method may blocks the calling thread until file read finished.
- Parameters
-
key | A string identifying the image. If nil, just return NO. |
type | The cache type. |
- Returns
- Whether the image is in cache.
◆ defaultCachePathForKey: [1/4]
- (nullable NSString *) defaultCachePathForKey: |
|
(nullable NSString *) |
key |
|
Get the default cache path for a certain key
- Parameters
-
key | the key (can be obtained from url using cacheKeyForURL) |
- Returns
- the default cache path
◆ defaultCachePathForKey: [2/4]
- (nullable NSString *) defaultCachePathForKey: |
|
(nullable NSString *) |
key |
|
Get the default cache path for a certain key
- Parameters
-
key | the key (can be obtained from url using cacheKeyForURL) |
- Returns
- the default cache path
◆ defaultCachePathForKey: [3/4]
- (nullable NSString *) defaultCachePathForKey: |
|
(nullable NSString *) |
key |
|
Get the default cache path for a certain key
- Parameters
-
key | the key (can be obtained from url using cacheKeyForURL) |
- Returns
- the default cache path
◆ defaultCachePathForKey: [4/4]
- (nullable NSString *) defaultCachePathForKey: |
|
(nullable NSString *) |
key |
|
Get the default cache path for a certain key
- Parameters
-
key | the key (can be obtained from url using cacheKeyForURL) |
- Returns
- the default cache path
◆ getImageDataForKey: [1/4]
- (nullable NSData *) getImageDataForKey: |
|
(NSString *) |
key |
|
Returns the image data associated with a given key. This method may blocks the calling thread until file read finished.
- Parameters
-
key | A string identifying the image. If nil, just return nil. |
- Returns
- The image data associated with key, or nil if no image is associated with key.
◆ getImageDataForKey: [2/4]
- (nullable NSData *) getImageDataForKey: |
|
(NSString *) |
key |
|
Returns the image data associated with a given key. This method may blocks the calling thread until file read finished.
- Parameters
-
key | A string identifying the image. If nil, just return nil. |
- Returns
- The image data associated with key, or nil if no image is associated with key.
◆ getImageDataForKey: [3/4]
- (nullable NSData *) getImageDataForKey: |
|
(NSString *) |
key |
|
Returns the image data associated with a given key. This method may blocks the calling thread until file read finished.
- Parameters
-
key | A string identifying the image. If nil, just return nil. |
- Returns
- The image data associated with key, or nil if no image is associated with key.
◆ getImageDataForKey: [4/4]
- (nullable NSData *) getImageDataForKey: |
|
(NSString *) |
key |
|
Returns the image data associated with a given key. This method may blocks the calling thread until file read finished.
- Parameters
-
key | A string identifying the image. If nil, just return nil. |
- Returns
- The image data associated with key, or nil if no image is associated with key.
◆ getImageDataForKey:withBlock: [1/4]
- (void) getImageDataForKey: |
|
(NSString *) |
key |
withBlock: |
|
(void(^)(NSData *_Nullable imageData)) |
block |
|
|
| |
Asynchronously get the image data associated with a given key.
- Parameters
-
key | A string identifying the image. If nil, just return nil. |
block | A completion block which will be called on main thread. |
◆ getImageDataForKey:withBlock: [2/4]
- (void) getImageDataForKey: |
|
(NSString *) |
key |
withBlock: |
|
(void(^)(NSData *_Nullable imageData)) |
block |
|
|
| |
Asynchronously get the image data associated with a given key.
- Parameters
-
key | A string identifying the image. If nil, just return nil. |
block | A completion block which will be called on main thread. |
◆ getImageDataForKey:withBlock: [3/4]
- (void) getImageDataForKey: |
|
(NSString *) |
key |
withBlock: |
|
(void(^)(NSData *_Nullable imageData)) |
block |
|
|
| |
Asynchronously get the image data associated with a given key.
- Parameters
-
key | A string identifying the image. If nil, just return nil. |
block | A completion block which will be called on main thread. |
◆ getImageDataForKey:withBlock: [4/4]
- (void) getImageDataForKey: |
|
(NSString *) |
key |
withBlock: |
|
(void(^)(NSData *_Nullable imageData)) |
block |
|
|
| |
Asynchronously get the image data associated with a given key.
- Parameters
-
key | A string identifying the image. If nil, just return nil. |
block | A completion block which will be called on main thread. |
◆ getImageForKey: [1/4]
- (nullable UIImage *) getImageForKey: |
|
(NSString *) |
key |
|
Returns the image associated with a given key. If the image is not in memory, this method may blocks the calling thread until file read finished.
- Parameters
-
key | A string identifying the image. If nil, just return nil. |
- Returns
- The image associated with key, or nil if no image is associated with key.
◆ getImageForKey: [2/4]
- (nullable UIImage *) getImageForKey: |
|
(NSString *) |
key |
|
Returns the image associated with a given key. If the image is not in memory, this method may blocks the calling thread until file read finished.
- Parameters
-
key | A string identifying the image. If nil, just return nil. |
- Returns
- The image associated with key, or nil if no image is associated with key.
◆ getImageForKey: [3/4]
- (nullable UIImage *) getImageForKey: |
|
(NSString *) |
key |
|
Returns the image associated with a given key. If the image is not in memory, this method may blocks the calling thread until file read finished.
- Parameters
-
key | A string identifying the image. If nil, just return nil. |
- Returns
- The image associated with key, or nil if no image is associated with key.
◆ getImageForKey: [4/4]
- (nullable UIImage *) getImageForKey: |
|
(NSString *) |
key |
|
Returns the image associated with a given key. If the image is not in memory, this method may blocks the calling thread until file read finished.
- Parameters
-
key | A string identifying the image. If nil, just return nil. |
- Returns
- The image associated with key, or nil if no image is associated with key.
◆ getImageForKey:withType: [1/4]
- (nullable UIImage *) getImageForKey: |
|
(NSString *) |
key |
withType: |
|
(ThingEncryptImageCacheType) |
type |
|
|
| |
Returns the image associated with a given key. If the image is not in memory and the type
contains ThingEncryptImageCacheTypeDisk
, this method may blocks the calling thread until file read finished.
- Parameters
-
key | A string identifying the image. If nil, just return nil. |
- Returns
- The image associated with key, or nil if no image is associated with key.
◆ getImageForKey:withType: [2/4]
- (nullable UIImage *) getImageForKey: |
|
(NSString *) |
key |
withType: |
|
(ThingEncryptImageCacheType) |
type |
|
|
| |
Returns the image associated with a given key. If the image is not in memory and the type
contains ThingEncryptImageCacheTypeDisk
, this method may blocks the calling thread until file read finished.
- Parameters
-
key | A string identifying the image. If nil, just return nil. |
- Returns
- The image associated with key, or nil if no image is associated with key.
◆ getImageForKey:withType: [3/4]
- (nullable UIImage *) getImageForKey: |
|
(NSString *) |
key |
withType: |
|
(ThingEncryptImageCacheType) |
type |
|
|
| |
Returns the image associated with a given key. If the image is not in memory and the type
contains ThingEncryptImageCacheTypeDisk
, this method may blocks the calling thread until file read finished.
- Parameters
-
key | A string identifying the image. If nil, just return nil. |
- Returns
- The image associated with key, or nil if no image is associated with key.
◆ getImageForKey:withType: [4/4]
- (nullable UIImage *) getImageForKey: |
|
(NSString *) |
key |
withType: |
|
(ThingEncryptImageCacheType) |
type |
|
|
| |
Returns the image associated with a given key. If the image is not in memory and the type
contains ThingEncryptImageCacheTypeDisk
, this method may blocks the calling thread until file read finished.
- Parameters
-
key | A string identifying the image. If nil, just return nil. |
- Returns
- The image associated with key, or nil if no image is associated with key.
◆ getImageForKey:withType:withBlock: [1/4]
- (void) getImageForKey: |
|
(NSString *) |
key |
withType: |
|
(ThingEncryptImageCacheType) |
type |
withBlock: |
|
(void(^)(UIImage *_Nullable image, ThingEncryptImageCacheType type)) |
block |
|
|
| |
Asynchronously get the image associated with a given key.
- Parameters
-
key | A string identifying the image. If nil, just return nil. |
type | The cache type. |
block | A completion block which will be called on main thread. |
◆ getImageForKey:withType:withBlock: [2/4]
- (void) getImageForKey: |
|
(NSString *) |
key |
withType: |
|
(ThingEncryptImageCacheType) |
type |
withBlock: |
|
(void(^)(UIImage *_Nullable image, ThingEncryptImageCacheType type)) |
block |
|
|
| |
Asynchronously get the image associated with a given key.
- Parameters
-
key | A string identifying the image. If nil, just return nil. |
type | The cache type. |
block | A completion block which will be called on main thread. |
◆ getImageForKey:withType:withBlock: [3/4]
- (void) getImageForKey: |
|
(NSString *) |
key |
withType: |
|
(ThingEncryptImageCacheType) |
type |
withBlock: |
|
(void(^)(UIImage *_Nullable image, ThingEncryptImageCacheType type)) |
block |
|
|
| |
Asynchronously get the image associated with a given key.
- Parameters
-
key | A string identifying the image. If nil, just return nil. |
type | The cache type. |
block | A completion block which will be called on main thread. |
◆ getImageForKey:withType:withBlock: [4/4]
- (void) getImageForKey: |
|
(NSString *) |
key |
withType: |
|
(ThingEncryptImageCacheType) |
type |
withBlock: |
|
(void(^)(UIImage *_Nullable image, ThingEncryptImageCacheType type)) |
block |
|
|
| |
Asynchronously get the image associated with a given key.
- Parameters
-
key | A string identifying the image. If nil, just return nil. |
type | The cache type. |
block | A completion block which will be called on main thread. |
◆ removeImageForKey: [1/4]
- (void) removeImageForKey: |
|
(NSString *) |
key |
|
Removes the image of the specified key in the cache (both memory and disk). This method returns immediately and executes the remove operation in background.
- Parameters
-
key | The key identifying the image to be removed. If nil, this method has no effect. |
◆ removeImageForKey: [2/4]
- (void) removeImageForKey: |
|
(NSString *) |
key |
|
Removes the image of the specified key in the cache (both memory and disk). This method returns immediately and executes the remove operation in background.
- Parameters
-
key | The key identifying the image to be removed. If nil, this method has no effect. |
◆ removeImageForKey: [3/4]
- (void) removeImageForKey: |
|
(NSString *) |
key |
|
Removes the image of the specified key in the cache (both memory and disk). This method returns immediately and executes the remove operation in background.
- Parameters
-
key | The key identifying the image to be removed. If nil, this method has no effect. |
◆ removeImageForKey: [4/4]
- (void) removeImageForKey: |
|
(NSString *) |
key |
|
Removes the image of the specified key in the cache (both memory and disk). This method returns immediately and executes the remove operation in background.
- Parameters
-
key | The key identifying the image to be removed. If nil, this method has no effect. |
◆ removeImageForKey:completion: [1/4]
- (void) removeImageForKey: |
|
(NSString *) |
key |
completion: |
|
(nullable void(^)(void)) |
completion |
|
|
| |
Removes the image of the specified key in the cache (both memory and disk). This method returns immediately and executes the remove operation in background.
- Parameters
-
key | The key identifying the image to be removed. If nil, this method has no effect. |
completion | A completion block which will be called on main thread. |
◆ removeImageForKey:completion: [2/4]
- (void) removeImageForKey: |
|
(NSString *) |
key |
completion: |
|
(nullable void(^)(void)) |
completion |
|
|
| |
Removes the image of the specified key in the cache (both memory and disk). This method returns immediately and executes the remove operation in background.
- Parameters
-
key | The key identifying the image to be removed. If nil, this method has no effect. |
completion | A completion block which will be called on main thread. |
◆ removeImageForKey:completion: [3/4]
- (void) removeImageForKey: |
|
(NSString *) |
key |
completion: |
|
(nullable void(^)(void)) |
completion |
|
|
| |
Removes the image of the specified key in the cache (both memory and disk). This method returns immediately and executes the remove operation in background.
- Parameters
-
key | The key identifying the image to be removed. If nil, this method has no effect. |
completion | A completion block which will be called on main thread. |
◆ removeImageForKey:completion: [4/4]
- (void) removeImageForKey: |
|
(NSString *) |
key |
completion: |
|
(nullable void(^)(void)) |
completion |
|
|
| |
Removes the image of the specified key in the cache (both memory and disk). This method returns immediately and executes the remove operation in background.
- Parameters
-
key | The key identifying the image to be removed. If nil, this method has no effect. |
completion | A completion block which will be called on main thread. |
◆ removeImageForKey:withType: [1/4]
Removes the image of the specified key in the cache. This method returns immediately and executes the remove operation in background.
- Parameters
-
key | The key identifying the image to be removed. If nil, this method has no effect. |
type | The cache type to remove image. |
◆ removeImageForKey:withType: [2/4]
Removes the image of the specified key in the cache. This method returns immediately and executes the remove operation in background.
- Parameters
-
key | The key identifying the image to be removed. If nil, this method has no effect. |
type | The cache type to remove image. |
◆ removeImageForKey:withType: [3/4]
Removes the image of the specified key in the cache. This method returns immediately and executes the remove operation in background.
- Parameters
-
key | The key identifying the image to be removed. If nil, this method has no effect. |
type | The cache type to remove image. |
◆ removeImageForKey:withType: [4/4]
Removes the image of the specified key in the cache. This method returns immediately and executes the remove operation in background.
- Parameters
-
key | The key identifying the image to be removed. If nil, this method has no effect. |
type | The cache type to remove image. |
◆ removeImageForKey:withType:completion: [1/4]
- (void) removeImageForKey: |
|
(NSString *) |
key |
withType: |
|
(ThingEncryptImageCacheType) |
type |
completion: |
|
(nullable void(^)(void)) |
completion |
|
|
| |
Removes the image of the specified key in the cache. This method returns immediately and executes the remove operation in background.
- Parameters
-
key | The key identifying the image to be removed. If nil, this method has no effect. |
type | The cache type to remove image. |
completion | A completion block which will be called on main thread. |
◆ removeImageForKey:withType:completion: [2/4]
- (void) removeImageForKey: |
|
(NSString *) |
key |
withType: |
|
(ThingEncryptImageCacheType) |
type |
completion: |
|
(nullable void(^)(void)) |
completion |
|
|
| |
Removes the image of the specified key in the cache. This method returns immediately and executes the remove operation in background.
- Parameters
-
key | The key identifying the image to be removed. If nil, this method has no effect. |
type | The cache type to remove image. |
completion | A completion block which will be called on main thread. |
◆ removeImageForKey:withType:completion: [3/4]
- (void) removeImageForKey: |
|
(NSString *) |
key |
withType: |
|
(ThingEncryptImageCacheType) |
type |
completion: |
|
(nullable void(^)(void)) |
completion |
|
|
| |
Removes the image of the specified key in the cache. This method returns immediately and executes the remove operation in background.
- Parameters
-
key | The key identifying the image to be removed. If nil, this method has no effect. |
type | The cache type to remove image. |
completion | A completion block which will be called on main thread. |
◆ removeImageForKey:withType:completion: [4/4]
- (void) removeImageForKey: |
|
(NSString *) |
key |
withType: |
|
(ThingEncryptImageCacheType) |
type |
completion: |
|
(nullable void(^)(void)) |
completion |
|
|
| |
Removes the image of the specified key in the cache. This method returns immediately and executes the remove operation in background.
- Parameters
-
key | The key identifying the image to be removed. If nil, this method has no effect. |
type | The cache type to remove image. |
completion | A completion block which will be called on main thread. |
◆ setImage:forKey: [1/4]
- (void) setImage: |
|
(UIImage *) |
image |
forKey: |
|
(NSString *) |
key |
|
|
| |
Sets the image with the specified key in the cache (both memory and disk). This method returns immediately and executes the store operation in background.
- Parameters
-
image | The image to be stored in the cache. If nil, this method has no effect. |
key | The key with which to associate the image. If nil, this method has no effect. |
◆ setImage:forKey: [2/4]
- (void) setImage: |
|
(UIImage *) |
image |
forKey: |
|
(NSString *) |
key |
|
|
| |
Sets the image with the specified key in the cache (both memory and disk). This method returns immediately and executes the store operation in background.
- Parameters
-
image | The image to be stored in the cache. If nil, this method has no effect. |
key | The key with which to associate the image. If nil, this method has no effect. |
◆ setImage:forKey: [3/4]
- (void) setImage: |
|
(UIImage *) |
image |
forKey: |
|
(NSString *) |
key |
|
|
| |
Sets the image with the specified key in the cache (both memory and disk). This method returns immediately and executes the store operation in background.
- Parameters
-
image | The image to be stored in the cache. If nil, this method has no effect. |
key | The key with which to associate the image. If nil, this method has no effect. |
◆ setImage:forKey: [4/4]
- (void) setImage: |
|
(UIImage *) |
image |
forKey: |
|
(NSString *) |
key |
|
|
| |
Sets the image with the specified key in the cache (both memory and disk). This method returns immediately and executes the store operation in background.
- Parameters
-
image | The image to be stored in the cache. If nil, this method has no effect. |
key | The key with which to associate the image. If nil, this method has no effect. |
◆ setImage:forKey:complete: [1/4]
- (void) setImage: |
|
(UIImage *) |
image |
forKey: |
|
(NSString *) |
key |
complete: |
|
(nullable void(^)(void)) |
complete |
|
|
| |
Sets the image with the specified key in the cache (both memory and disk). This method returns immediately and executes the store operation in background.
- Parameters
-
image | The image to be stored in the cache. If nil, this method has no effect. |
key | The key with which to associate the image. If nil, this method has no effect. |
complete | A completion block which will be called on main thread. |
◆ setImage:forKey:complete: [2/4]
- (void) setImage: |
|
(UIImage *) |
image |
forKey: |
|
(NSString *) |
key |
complete: |
|
(nullable void(^)(void)) |
complete |
|
|
| |
Sets the image with the specified key in the cache (both memory and disk). This method returns immediately and executes the store operation in background.
- Parameters
-
image | The image to be stored in the cache. If nil, this method has no effect. |
key | The key with which to associate the image. If nil, this method has no effect. |
complete | A completion block which will be called on main thread. |
◆ setImage:forKey:complete: [3/4]
- (void) setImage: |
|
(UIImage *) |
image |
forKey: |
|
(NSString *) |
key |
complete: |
|
(nullable void(^)(void)) |
complete |
|
|
| |
Sets the image with the specified key in the cache (both memory and disk). This method returns immediately and executes the store operation in background.
- Parameters
-
image | The image to be stored in the cache. If nil, this method has no effect. |
key | The key with which to associate the image. If nil, this method has no effect. |
complete | A completion block which will be called on main thread. |
◆ setImage:forKey:complete: [4/4]
- (void) setImage: |
|
(UIImage *) |
image |
forKey: |
|
(NSString *) |
key |
complete: |
|
(nullable void(^)(void)) |
complete |
|
|
| |
Sets the image with the specified key in the cache (both memory and disk). This method returns immediately and executes the store operation in background.
- Parameters
-
image | The image to be stored in the cache. If nil, this method has no effect. |
key | The key with which to associate the image. If nil, this method has no effect. |
complete | A completion block which will be called on main thread. |
◆ setImage:imageData:forKey:withType: [1/4]
- (void) setImage: |
|
(nullable UIImage *) |
image |
imageData: |
|
(nullable NSData *) |
imageData |
forKey: |
|
(NSString *) |
key |
withType: |
|
(ThingEncryptImageCacheType) |
type |
|
|
| |
Sets the image with the specified key in the cache. This method returns immediately and executes the store operation in background.
@discussion If the type
contain ThingEncryptImageCacheTypeMemory
, then the image
will be stored in the memory cache; imageData
will be used instead if image
is nil. If the type
contain ThingEncryptImageCacheTypeDisk
, then the imageData
will be stored in the disk cache; image
will be used instead if imageData
is nil.
- Parameters
-
image | The image to be stored in the cache. |
imageData | The image data to be stored in the cache. |
key | The key with which to associate the image. If nil, this method has no effect. |
type | The cache type to store image. |
◆ setImage:imageData:forKey:withType: [2/4]
- (void) setImage: |
|
(nullable UIImage *) |
image |
imageData: |
|
(nullable NSData *) |
imageData |
forKey: |
|
(NSString *) |
key |
withType: |
|
(ThingEncryptImageCacheType) |
type |
|
|
| |
Sets the image with the specified key in the cache. This method returns immediately and executes the store operation in background.
@discussion If the type
contain ThingEncryptImageCacheTypeMemory
, then the image
will be stored in the memory cache; imageData
will be used instead if image
is nil. If the type
contain ThingEncryptImageCacheTypeDisk
, then the imageData
will be stored in the disk cache; image
will be used instead if imageData
is nil.
- Parameters
-
image | The image to be stored in the cache. |
imageData | The image data to be stored in the cache. |
key | The key with which to associate the image. If nil, this method has no effect. |
type | The cache type to store image. |
◆ setImage:imageData:forKey:withType: [3/4]
- (void) setImage: |
|
(nullable UIImage *) |
image |
imageData: |
|
(nullable NSData *) |
imageData |
forKey: |
|
(NSString *) |
key |
withType: |
|
(ThingEncryptImageCacheType) |
type |
|
|
| |
Sets the image with the specified key in the cache. This method returns immediately and executes the store operation in background.
@discussion If the type
contain ThingEncryptImageCacheTypeMemory
, then the image
will be stored in the memory cache; imageData
will be used instead if image
is nil. If the type
contain ThingEncryptImageCacheTypeDisk
, then the imageData
will be stored in the disk cache; image
will be used instead if imageData
is nil.
- Parameters
-
image | The image to be stored in the cache. |
imageData | The image data to be stored in the cache. |
key | The key with which to associate the image. If nil, this method has no effect. |
type | The cache type to store image. |
◆ setImage:imageData:forKey:withType: [4/4]
- (void) setImage: |
|
(nullable UIImage *) |
image |
imageData: |
|
(nullable NSData *) |
imageData |
forKey: |
|
(NSString *) |
key |
withType: |
|
(ThingEncryptImageCacheType) |
type |
|
|
| |
Sets the image with the specified key in the cache. This method returns immediately and executes the store operation in background.
@discussion If the type
contain ThingEncryptImageCacheTypeMemory
, then the image
will be stored in the memory cache; imageData
will be used instead if image
is nil. If the type
contain ThingEncryptImageCacheTypeDisk
, then the imageData
will be stored in the disk cache; image
will be used instead if imageData
is nil.
- Parameters
-
image | The image to be stored in the cache. |
imageData | The image data to be stored in the cache. |
key | The key with which to associate the image. If nil, this method has no effect. |
type | The cache type to store image. |
◆ setImage:imageData:forKey:withType:complete: [1/4]
- (void) setImage: |
|
(nullable UIImage *) |
image |
imageData: |
|
(nullable NSData *) |
imageData |
forKey: |
|
(NSString *) |
key |
withType: |
|
(ThingEncryptImageCacheType) |
type |
complete: |
|
(nullable void(^)(void)) |
complete |
|
|
| |
Sets the image with the specified key in the cache. This method returns immediately and executes the store operation in background.
@discussion If the type
contain ThingEncryptImageCacheTypeMemory
, then the image
will be stored in the memory cache; imageData
will be used instead if image
is nil. If the type
contain ThingEncryptImageCacheTypeDisk
, then the imageData
will be stored in the disk cache; image
will be used instead if imageData
is nil.
- Parameters
-
image | The image to be stored in the cache. |
imageData | The image data to be stored in the cache. |
key | The key with which to associate the image. If nil, this method has no effect. |
type | The cache type to store image. |
complete | A completion block which will be called on main thread. |
◆ setImage:imageData:forKey:withType:complete: [2/4]
- (void) setImage: |
|
(nullable UIImage *) |
image |
imageData: |
|
(nullable NSData *) |
imageData |
forKey: |
|
(NSString *) |
key |
withType: |
|
(ThingEncryptImageCacheType) |
type |
complete: |
|
(nullable void(^)(void)) |
complete |
|
|
| |
Sets the image with the specified key in the cache. This method returns immediately and executes the store operation in background.
@discussion If the type
contain ThingEncryptImageCacheTypeMemory
, then the image
will be stored in the memory cache; imageData
will be used instead if image
is nil. If the type
contain ThingEncryptImageCacheTypeDisk
, then the imageData
will be stored in the disk cache; image
will be used instead if imageData
is nil.
- Parameters
-
image | The image to be stored in the cache. |
imageData | The image data to be stored in the cache. |
key | The key with which to associate the image. If nil, this method has no effect. |
type | The cache type to store image. |
complete | A completion block which will be called on main thread. |
◆ setImage:imageData:forKey:withType:complete: [3/4]
- (void) setImage: |
|
(nullable UIImage *) |
image |
imageData: |
|
(nullable NSData *) |
imageData |
forKey: |
|
(NSString *) |
key |
withType: |
|
(ThingEncryptImageCacheType) |
type |
complete: |
|
(nullable void(^)(void)) |
complete |
|
|
| |
Sets the image with the specified key in the cache. This method returns immediately and executes the store operation in background.
@discussion If the type
contain ThingEncryptImageCacheTypeMemory
, then the image
will be stored in the memory cache; imageData
will be used instead if image
is nil. If the type
contain ThingEncryptImageCacheTypeDisk
, then the imageData
will be stored in the disk cache; image
will be used instead if imageData
is nil.
- Parameters
-
image | The image to be stored in the cache. |
imageData | The image data to be stored in the cache. |
key | The key with which to associate the image. If nil, this method has no effect. |
type | The cache type to store image. |
complete | A completion block which will be called on main thread. |
◆ setImage:imageData:forKey:withType:complete: [4/4]
- (void) setImage: |
|
(nullable UIImage *) |
image |
imageData: |
|
(nullable NSData *) |
imageData |
forKey: |
|
(NSString *) |
key |
withType: |
|
(ThingEncryptImageCacheType) |
type |
complete: |
|
(nullable void(^)(void)) |
complete |
|
|
| |
Sets the image with the specified key in the cache. This method returns immediately and executes the store operation in background.
@discussion If the type
contain ThingEncryptImageCacheTypeMemory
, then the image
will be stored in the memory cache; imageData
will be used instead if image
is nil. If the type
contain ThingEncryptImageCacheTypeDisk
, then the imageData
will be stored in the disk cache; image
will be used instead if imageData
is nil.
- Parameters
-
image | The image to be stored in the cache. |
imageData | The image data to be stored in the cache. |
key | The key with which to associate the image. If nil, this method has no effect. |
type | The cache type to store image. |
complete | A completion block which will be called on main thread. |
◆ sharedCache [1/4]
+ (instancetype) sharedCache |
|
|
|
Returns global shared image cache instance.
- Returns
- The singleton ThingImageCache instance.
◆ sharedCache [2/4]
+ (instancetype) sharedCache |
|
|
|
Returns global shared image cache instance.
- Returns
- The singleton ThingImageCache instance.
◆ sharedCache [3/4]
+ (instancetype) sharedCache |
|
|
|
Returns global shared image cache instance.
- Returns
- The singleton ThingImageCache instance.
◆ sharedCache [4/4]
+ (instancetype) sharedCache |
|
|
|
Returns global shared image cache instance.
- Returns
- The singleton ThingImageCache instance.
◆ totalDiskCount [1/4]
- (NSUInteger) totalDiskCount |
|
|
|
Get the number of images in the disk cache
◆ totalDiskCount [2/4]
- (NSUInteger) totalDiskCount |
|
|
|
Get the number of images in the disk cache
◆ totalDiskCount [3/4]
- (NSUInteger) totalDiskCount |
|
|
|
Get the number of images in the disk cache
◆ totalDiskCount [4/4]
- (NSUInteger) totalDiskCount |
|
|
|
Get the number of images in the disk cache
◆ totalDiskSize [1/4]
- (NSUInteger) totalDiskSize |
|
|
|
Get the total bytes size of images in the disk cache
◆ totalDiskSize [2/4]
- (NSUInteger) totalDiskSize |
|
|
|
Get the total bytes size of images in the disk cache
◆ totalDiskSize [3/4]
- (NSUInteger) totalDiskSize |
|
|
|
Get the total bytes size of images in the disk cache
◆ totalDiskSize [4/4]
- (NSUInteger) totalDiskSize |
|
|
|
Get the total bytes size of images in the disk cache
◆ UNAVAILABLE_ATTRIBUTE [1/8]
+ (instancetype) UNAVAILABLE_ATTRIBUTE |
|
|
|
◆ UNAVAILABLE_ATTRIBUTE [2/8]
- (instancetype) UNAVAILABLE_ATTRIBUTE |
|
|
|
◆ UNAVAILABLE_ATTRIBUTE [3/8]
+ (instancetype) UNAVAILABLE_ATTRIBUTE |
|
|
|
◆ UNAVAILABLE_ATTRIBUTE [4/8]
- (instancetype) UNAVAILABLE_ATTRIBUTE |
|
|
|
◆ UNAVAILABLE_ATTRIBUTE [5/8]
+ (instancetype) UNAVAILABLE_ATTRIBUTE |
|
|
|
◆ UNAVAILABLE_ATTRIBUTE [6/8]
- (instancetype) UNAVAILABLE_ATTRIBUTE |
|
|
|
◆ UNAVAILABLE_ATTRIBUTE [7/8]
+ (instancetype) UNAVAILABLE_ATTRIBUTE |
|
|
|
◆ UNAVAILABLE_ATTRIBUTE [8/8]
- (instancetype) UNAVAILABLE_ATTRIBUTE |
|
|
|
◆ allowAnimatedImage
- (BOOL) allowAnimatedImage |
|
readwriteatomic |
Whether decode animated image when fetch image from disk cache. Default is YES.
@discussion When fetch image from disk cache, it will use 'ThingInternalEncryptImage' to decode animated image such as WebP/APNG/GIF. Set to 'NO' to ignore animated image.
Definition at line 43 of file ThingEncryptImageCache.h.
◆ decodeForDisplay
- (BOOL) decodeForDisplay |
|
readwriteatomic |
Whether decode the image to memory bitmap. Default is YES.
@discussion If the value is YES, then the image will be decoded to memory bitmap for better display performance, but may cost more memory.
Definition at line 51 of file ThingEncryptImageCache.h.
◆ diskCache
◆ memoryCache
The documentation for this class was generated from the following files:
- /Users/humtong/Downloads/Pods_副本/ThingEncryptImage/Build/ThingEncryptImage.xcframework/watchos-arm64_i386_x86_64-simulator/ThingEncryptImage.framework/Headers/ThingEncryptImageCache.h
- /Users/humtong/Downloads/Pods_副本/ThingEncryptImage/Build/ThingEncryptImage.xcframework/ios-x86_64-simulator/ThingEncryptImage.framework/Headers/ThingEncryptImageCache.h
- /Users/humtong/Downloads/Pods_副本/ThingEncryptImage/Build/ThingEncryptImage.xcframework/ios-arm64/ThingEncryptImage.framework/Headers/ThingEncryptImageCache.h
- /Users/humtong/Downloads/Pods_副本/ThingEncryptImage/Build/ThingEncryptImage.xcframework/watchos-arm64_arm64_32_armv7k/ThingEncryptImage.framework/Headers/ThingEncryptImageCache.h