Skip to content
This repository has been archived by the owner on Dec 15, 2024. It is now read-only.

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
dmytro-anokhin committed Oct 22, 2020
1 parent caff815 commit b51a3fe
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ URLImage(url: url) { image in

## Installation

`URLImage` can be installed using Swift Package Manager.
`URLImage` can be installed using Swift Package Manager or Cocoa Pods.

## Usage

Expand Down Expand Up @@ -113,7 +113,15 @@ struct MyView: View {
- In memory cache for quick access;
- Local disk cache.

Downloaded images stored in user caches folder. This allows OS to take care of cleaning up files. However, it is also good idea to perform manual cleanup time to time. You can remove expired images by calling `URLImageService.shared.removeAllCachedImages()` as a part of your startup routine. Expiry interval can be set using `expiryInterval` property of `URLImageOptions`.
Downloaded images stored in user caches folder. This allows OS to take care of cleaning up files. It is also a good idea to perform manual cleanup time to time.

You can remove expired images by calling `cleanup` as a part of your startup routine. This will also remove image files from the previous `URLImage` version if you used it.

```
URLImageService.shared.cleanup()
```

Downloaded images expire after some time. Expired images removed in `cleanup` routine. Expiry interval can be set using `expiryInterval` property of `URLImageOptions`.

You can also remove individual or all cached images using `URLImageService`.

Expand Down

0 comments on commit b51a3fe

Please sign in to comment.