Cache

12 views
Skip to first unread message

davidtor...@gmail.com

unread,
Apr 1, 2015, 9:27:34 PM4/1/15
to django...@googlegroups.com
Hello,
is there a way i can avoid caching the result from an api call that will autocomplete my tags ?

$(document).ready(function(){
$('#id_tags').attr({'data-role':'tagsinput', 'class':'form-control'});
});

var tags = new Bloodhound({
datumTokenizer: Bloodhound.tokenizers.obj.whitespace('name'),
queryTokenizer: Bloodhound.tokenizers.whitespace,
prefetch: {
url: '/apicall-tag-autocomplete/',
filter: function(list) {
return $.map(list, function(tagname){
return {name : tagname}; });
}
}
});

tags.initialize();

$('#id_tags').tagsinput({
typeaheadjs: {
name: 'tags',
displayKey: 'name',
valueKey: 'name',
source : tags.ttAdapter()
}
});

</script>

Of some how force the client to revalidate those results ?

Thanks,
David
Reply all
Reply to author
Forward
0 new messages