Skip to content

Commit

Permalink
[IGNORE]: extracted to hotwired#1024
Browse files Browse the repository at this point in the history
  • Loading branch information
seanpdoyle committed Oct 8, 2023
1 parent a31d044 commit 7b8f1be
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
4 changes: 0 additions & 4 deletions src/core/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ import { setMetaContent } from "../util"
import { SnapshotCache } from "./drive/snapshot_cache"

export class Cache {
constructor(session) {
this.session = session
}

clear() {
this.store.clear()
}
Expand Down
4 changes: 1 addition & 3 deletions src/core/index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import { Session } from "./session"
import { Cache } from "./cache"
import { PageRenderer } from "./drive/page_renderer"
import { PageSnapshot } from "./drive/page_snapshot"
import { FrameRenderer } from "./frames/frame_renderer"
import { FormSubmission } from "./drive/form_submission"
import { LimitedSet } from "./drive/limited_set"

const session = new Session()
const cache = new Cache(session)
const recentRequests = new LimitedSet(20)
const { navigator } = session
const { cache, navigator } = session
export { navigator, session, cache, recentRequests, PageRenderer, PageSnapshot, FrameRenderer }

/**
Expand Down
2 changes: 2 additions & 0 deletions src/core/session.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { clearBusyState, dispatch, findClosestRecursively, getVisitAction, markA
import { PageView } from "./drive/page_view"
import { FrameElement } from "../elements/frame_element"
import { Preloader } from "./drive/preloader"
import { Cache } from "./cache"

export class Session {
navigator = new Navigator(this)
Expand All @@ -33,6 +34,7 @@ export class Session {
formLinkClickObserver = new FormLinkClickObserver(this, document.documentElement)
frameRedirector = new FrameRedirector(this, document.documentElement)
streamMessageRenderer = new StreamMessageRenderer()
cache = new Cache(this)

drive = true
enabled = true
Expand Down

0 comments on commit 7b8f1be

Please sign in to comment.