Skip to content

Commit 294892f

Browse files
committed
Update README.
1 parent 5d824bf commit 294892f

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -253,18 +253,14 @@ LaTeX(input)
253253

254254
`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.
255255

256-
The caches are managed automatically, but if, for example, you wanted to clear the cache manually you may do so.
257-
258256
```swift
259257
// Clear the SVG data cache.
260-
LaTeX.dataCache?.removeAll()
258+
LaTeX.dataCache.removeAllObjects()
261259

262260
// Clear the rendered image cache.
263-
LaTeX.imageCache.removeAll()
261+
LaTeX.imageCache.removeAllObjects()
264262
```
265263

266-
`LaTeXSwiftUI` uses the [caching](https://github.com/kean/Nuke/tree/master/Sources/Nuke/Caching) components of the [Nuke](https://github.com/kean/Nuke) package.
267-
268264
### 🏃‍♀️ Preloading
269265

270266
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.

0 commit comments

Comments
 (0)