Autocomplete Caching Basics
- I need some help understanding caching and autocomplete.
When the docs talk about caching, it's mostly to do with the remote /
http request stuff, right? What I don't get is how long the cache
lives for.. a session, or a page view?
Let me put it a different way, and this shows my ignorance of
was going to use the http request method, but now that I look at it,
that whole DB is only about 65k.
Is there anything in autocomplete that would let me to create a big
old array and benefit from the same kind of brower caching that caches
css files? Like, can I have a file which just sets up the array, and
is referenced from autocomplete many times over a users session - but
because it's the same file, the data is pulled from a users local cache?
Am I making sense.. Sorry, this is perhaps more of a noob js question
than a YUI one ;-)?
- Keith,You're right that AutoComplete's caching mechanism is focused on the XHR data sources. You're also right that your small 65KB dataset is a good candidate for a JS_Array data source rather than an XHR data source. If you include that data as an external script file, and if your server is configured with gzip enabled and far-futures expires headers, you can expect that file to be cached.The assumption, then, is that the data doesn't change very much or that you'll version-stamp the filename so that when the data does change the user pulls in the new file version.Along these lines, we've done a bunch of research on cache usage that might be of interest --Regards,EricOn Mar 29, 2007, at 9:54 PM, MrWump wrote: