Skip to main content

Search and Top Navigation

#9707 closed feature (notabug)

Opened December 12, 2013 02:05PM UTC

Closed December 12, 2013 02:14PM UTC

Last modified December 12, 2013 03:03PM UTC

No possibility to disable caching in autocomplete

Reported by: err1 Owned by:
Priority: minor Milestone: none
Component: ui.autocomplete Version: 1.10.3
Keywords: Cc:
Blocked by: Blocking:
Description

Hi

i Wonder if my ticket will be read as an evolution request or as a bug...

For my personnal use, the lack i met is a bug, and to fix it i had to modify the js code.

The problem seems to be known : there is no possibility to disable the caching facility of ui.autocomplete, and in some case it generates problems...

I use a database to provide the source of my autocompletion, excepting some of them.

If the data i want to filter have been updated in the same Context / Session (i work with C# MVC3 IE9/10), the autocompletion continues to propose them...

For now i'm ok, having added the "cache :false" in the ajax call of _initSource function...

But i really think that a 'cache' parameter is necessary for the widget.

Thank you for you reading :-)

err1

Attachments (0)
Change History (5)

Changed December 12, 2013 02:14PM UTC by scottgonzalez comment:1

resolution: → notabug
status: newclosed

There is no cache built into the autocomplete widget.

Changed December 12, 2013 02:22PM UTC by err1 comment:2

Thank you for your answer, but it was exactly the point of my ticket :

THERE SHOULD BE a cache parameter in autocomplete !

It uses ajax call, for which the cache parameter is (because of this lack) always true !

Changed December 12, 2013 02:26PM UTC by scottgonzalez comment:3

We're not going to add a cache option. There are a ton of different caching strategies. The need to not cache (at the ajax level) is pretty rare, and it's very easy to disable that when you need to.

Changed December 12, 2013 02:55PM UTC by err1 comment:4

_comment0: i understand your point of view, but i disagree with you in 3 points : \ - when you need autocompletion on data that are updated in realtime, we have to offer the users the last version, no matter what. \ - jqueryUi, a such easy tool to use and to understand, should propose the easiest way to answer those problems. A newbye as i was (ok, as i am in so many points) need to focus in one tool and not to go and seek the Tools used by the first tool. _initSource uses Ajax, so you have to propose the ajax options, that's it. it's not the job of the developper to find how to disable globally the ajax option \ - as you said, sometime you need caching, sometime not. Disabling ajax caching for some fields and not for others is much difficult than chosing an option in jqueryUi function, dont you think ? \ \ Anyway, thank you for your answers :-) \ err11386860309971234

i understand your point of view, but i disagree with you in 3 points :

  • when you need autocompletion on data that are updated in realtime, we have to offer the users the last version, no matter what.
  • jqueryUi, a such easy tool to use and to understand, should propose the easiest way to answer those problems. A newbye as i was (ok, as i am in so many points) need to focus in one tool and not to go and seek the Tools used by the first tool. _initSource uses Ajax, so you have to propose the ajax options, that's it. it's not the job of the developper to find how to disable globally the ajax option
  • as you said, sometime you need caching, sometime not. Disabling ajax caching for some fields and not for others is much more difficult than chosing an option in jqueryUi function, dont you think ?

Anyway, thank you for your answers :-)

err1

Changed December 12, 2013 03:03PM UTC by scottgonzalez comment:5

Replying to [comment:4 err1]:

- when you need autocompletion on data that are updated in realtime, we have to offer the users the last version, no matter what.

So don't let your server allow caching of that data.

- jqueryUi, a such easy tool to use and to understand, should propose the easiest way to answer those problems. A newbye as i was (ok, as i am in so many points) need to focus in one tool and not to go and seek the Tools used by the first tool. _initSource uses Ajax, so you have to propose the ajax options, that's it. it's not the job of the developper to find how to disable globally the ajax option

There are plenty of demos showing how to use a custom source. It is absolutely the job of the developer to configure their tools to work the way they want.

- as you said, sometime you need caching, sometime not. Disabling ajax caching for some fields and not for others is much more difficult than chosing an option in jqueryUi function, dont you think ?

Building something on your own is always more complicated than toggling a simple option. But toggling simple options is always complicated by the addition of new options. We absolutely will not provide an option for every possible use case. Go read http://blog.jqueryui.com/2011/03/api-redesigns-the-past-present-and-future/

Anyway, thank you for your answers :-)

You're welcome.