diff options
| author | Stephen Blott | 2015-05-08 11:31:05 +0100 |
|---|---|---|
| committer | Stephen Blott | 2015-05-08 11:31:05 +0100 |
| commit | 44378220093ee5bd873b553f5be556921c778663 (patch) | |
| tree | e1a25809f3edb9975f0c47aad3a30f777e045604 /pages | |
| parent | 3e890adbbf7b6a9671b42536b6ee6221389b9443 (diff) | |
| download | vimium-44378220093ee5bd873b553f5be556921c778663.tar.bz2 | |
Search completion; clear (not replace) the cache.
Diffstat (limited to 'pages')
| -rw-r--r-- | pages/vomnibar.coffee | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pages/vomnibar.coffee b/pages/vomnibar.coffee index de1e6452..76e276a1 100644 --- a/pages/vomnibar.coffee +++ b/pages/vomnibar.coffee @@ -210,6 +210,7 @@ class BackgroundCompleter constructor: (@name) -> @port = chrome.runtime.connect name: "completions" @messageId = null + @cache ?= new SimpleCache 1000 * 60 * 5 @reset() @port.onMessage.addListener (msg) => @@ -259,8 +260,8 @@ class BackgroundCompleter @port.postMessage name: @name, handler: "refresh" reset: -> - # We only cache results for the duration of a single vomnibar activation. - @cache = new SimpleCache 1000 * 60 * 5 + # We only cache results for the duration of a single vomnibar activation, so clear the cache now. + @cache.clear() @mostRecentQuery = null cancel: -> |
