【发布时间】:2014-02-24 20:50:05
【问题描述】:
我做了一个这样的查询...第一次,它运行了过滤器...很酷,它工作...
但现在有更多条目,而且似乎快用完了缓存。如何强制它停止使用缓存?
var countries = new Bloodhound({
datumTokenizer: function (d) { return Bloodhound.tokenizers.whitespace(d.name); },
queryTokenizer: Bloodhound.tokenizers.whitespace,
limit: 10,
prefetch: {
url: Url + '/Country/JsonList',
filter: function (list) {
return $.map(list, function (country) { return { name: country.Name }; });
}
}
});
countries.initialize();
$('.countries.typeahead').typeahead(null, {
displayKey: 'name',
source: countries.ttAdapter()
});
【问题讨论】:
-
奇怪地清除 Google Chrome 缓存并重新启动 Chrome 似乎也没有清除预取缓存
标签: jquery caching twitter-typeahead