- Patch #25354 by Thox: fixed Javascript caching. Faster response and less server traffic for matches previously found.

4.7.x
Dries Buytaert 2005-07-03 16:12:55 +00:00
parent f14cb1ab2b
commit 338a135bfb
1 changed files with 3 additions and 5 deletions

View File

@ -230,11 +230,9 @@ function ACDB(uri) {
* Performs a cached and delayed search
*/
ACDB.prototype.search = function(searchString) {
if (this.docache) {
this.searchString = searchString;
if (this.cache[searchString]) {
return this.match(this.cache[searchString]);
}
this.searchString = searchString;
if (this.cache[searchString]) {
return this.owner.found(this.cache[searchString]);
}
if (this.timer) {
clearTimeout(this.timer);