Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into morph-refreshes
Browse files Browse the repository at this point in the history
* origin/main:
  Pass session instance to cache constructor (#1063)
  • Loading branch information
afcapel committed Nov 14, 2023
2 parents 022c1df + 0d2ec4b commit bdee6f4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/cache.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { setMetaContent } from "../util"

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

clear() {
this.session.clearCache()
}
Expand Down
1 change: 1 addition & 0 deletions src/tests/unit/export_tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ test("Turbo interface", () => {
assert.equal(typeof Turbo.setConfirmMethod, "function")
assert.equal(typeof Turbo.setFormMode, "function")
assert.equal(typeof Turbo.cache, "object")
assert.equal(typeof Turbo.cache.clear, "function")
assert.equal(typeof Turbo.navigator, "object")
assert.equal(typeof Turbo.session, "object")
})
Expand Down

0 comments on commit bdee6f4

Please sign in to comment.