diff --git a/Source/Session/Session.swift b/Source/Session/Session.swift index 98fc287..54a6e8a 100644 --- a/Source/Session/Session.swift +++ b/Source/Session/Session.swift @@ -11,7 +11,7 @@ public class Session: NSObject { public let webView: WKWebView public var pathConfiguration: PathConfiguration? - var needsCacheClearing = false + var isSnapshotCacheStale = false private lazy var bridge = WebViewBridge(webView: webView) private var initialized = false @@ -217,9 +217,9 @@ extension Session: VisitableDelegate { public func visitableViewWillAppear(_ visitable: Visitable) { guard let topmostVisit = self.topmostVisit, let currentVisit = self.currentVisit else { return } - if needsCacheClearing { + if isSnapshotCacheStale { clearSnapshotCache() - needsCacheClearing = false + isSnapshotCacheStale = false } if visitable === topmostVisit.visitable && visitable.visitableViewController.isMovingToParent { diff --git a/Source/Turbo Navigator/TurboNavigator.swift b/Source/Turbo Navigator/TurboNavigator.swift index 950b80d..499ee5c 100644 --- a/Source/Turbo Navigator/TurboNavigator.swift +++ b/Source/Turbo Navigator/TurboNavigator.swift @@ -143,7 +143,7 @@ extension TurboNavigator: SessionDelegate { public func sessionDidFinishFormSubmission(_ session: Session) { if session == modalSession { - self.session.needsCacheClearing = true + self.session.isSnapshotCacheStale = true } if let url = session.topmostVisitable?.visitableURL { delegate.formSubmissionDidFinish(at: url)