Skip to content

Commit 5b28488

Browse files
committed
disable query cache as it just gets in the way
1 parent 216a0dc commit 5b28488

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/js/vendor/docsearch.bundle.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,10 @@
5353
var input = controller.input
5454
var typeahead = input.data('aaAutocomplete')
5555
var dropdown = typeahead.dropdown
56-
delete dropdown.datasets[0].templates.footer
5756
var menu = dropdown.$menu
57+
var dataset = dropdown.datasets[0]
58+
dataset.cache = false
59+
delete dataset.templates.footer
5860
typeahead.setVal() // clear value on page reload
5961
input.on('autocomplete:closed', clearSearch.bind(typeahead))
6062
input.on('autocomplete:cursorchanged autocomplete:cursorremoved', saveSearchState.bind(typeahead))
@@ -118,7 +120,6 @@
118120
window.localStorage.setItem(SEARCH_FILTER_ACTIVE_KEY, e.target.checked)
119121
if (isClosed(this)) return
120122
var dropdown = this.dropdown
121-
dropdown.datasets[0].clearCachedSuggestions()
122123
dropdown.update(this.getVal())
123124
}
124125

@@ -246,7 +247,6 @@
246247
this.setVal()
247248
this.$facetFilterInput.prop('checked', searchState.filter)
248249
var dropdown = this.dropdown
249-
dropdown.datasets[0].clearCachedSuggestions()
250250
dropdown.restoring = searchState
251251
this.$input.focus()
252252
this.setVal(searchState.query) // cursor is restored by onResultsUpdated =>

0 commit comments

Comments
 (0)