Added missing param in storeImage examples

This commit is contained in:
Ryan Cohen 2018-01-13 18:23:41 -05:00 committed by GitHub
parent 09e90b5215
commit 9256b51cd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 4 deletions

View File

@ -115,14 +115,16 @@ SDImageCache *imageCache = [[SDImageCache alloc] initWithNamespace:@"myNamespace
By default SDImageCache will lookup the disk cache if an image can't be found in the memory cache.
You can prevent this from happening by calling the alternative method `imageFromMemoryCacheForKey:`.
To store an image into the cache, you use the storeImage:forKey: method:
To store an image into the cache, you use the storeImage:forKey:completion: method:
```objective-c
[[SDImageCache sharedImageCache] storeImage:myImage forKey:myCacheKey];
[[SDImageCache sharedImageCache] storeImage:myImage forKey:myCacheKey completion:^{
// image stored
}];
```
By default, the image will be stored in memory cache as well as on disk cache (asynchronously). If
you want only the memory cache, use the alternative method storeImage:forKey:toDisk: with a negative
you want only the memory cache, use the alternative method storeImage:forKey:toDisk:completion: with a negative
third argument.
### Using cache key filter