From 294892f96fac3fb262b2e701e6fc6c65cb7eb4d0 Mon Sep 17 00:00:00 2001 From: Colin Campbell Date: Sun, 11 Jun 2023 16:26:59 -0500 Subject: [PATCH] Update README. --- README.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 7910c4e..b92de0d 100644 --- a/README.md +++ b/README.md @@ -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.