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