Skip to content

Commit

Permalink
Update README.
Browse files Browse the repository at this point in the history
  • Loading branch information
colinc86 committed Jun 11, 2023
1 parent 5d824bf commit 294892f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,18 +253,14 @@ LaTeX(input)

`LaTeXSwiftUI` caches its SVG responses from MathJax and the images rendered as a result of the view's environment. If you want to control the cache, then you can access the static `dataCache` and `imageCache` properties.

The caches are managed automatically, but if, for example, you wanted to clear the cache manually you may do so.

```swift
// Clear the SVG data cache.
LaTeX.dataCache?.removeAll()
LaTeX.dataCache.removeAllObjects()

// Clear the rendered image cache.
LaTeX.imageCache.removeAll()
LaTeX.imageCache.removeAllObjects()
```

`LaTeXSwiftUI` uses the [caching](https://github.com/kean/Nuke/tree/master/Sources/Nuke/Caching) components of the [Nuke](https://github.com/kean/Nuke) package.

### 🏃‍♀️ Preloading

SVGs and images are rendered and cached on demand, but there may be situations where you want to preload the data so that there is minimal lag when the view appears.
Expand Down

0 comments on commit 294892f

Please sign in to comment.