You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, with cache: true, the library will use its cache also for other query strings that are subsets of the user's query. However, this doesn't work for all use-cases. For example, I have an autocomplete field where the server uses the query as an ID to look up a row in the database. Thus, the results from a query like 1022 cannot be re-used to find results for 10228. It would be great if there was a way to specify that the cache must be exact (i.e., that the cache should only be used for lookups, not for searching).
The text was updated successfully, but these errors were encountered:
TheCrimsonKing92
pushed a commit
to TheCrimsonKing92/JavaScript-autoComplete
that referenced
this issue
Mar 13, 2017
Would you be willing to try the fix I committed to my fork of the repo?
It seemed to me the issue was that the code wouldn't go on to call source when it found empty result sets for "previous values" in its cache, rather than an issue with when values were cached to which key.
As such, setting any non-1 truthy value for cache will now set you to "strict caching", which will bypass the step to check for "previous values" in the cache and proceed to call source.
Currently, with
cache: true
, the library will use its cache also for other query strings that are subsets of the user's query. However, this doesn't work for all use-cases. For example, I have an autocomplete field where the server uses the query as an ID to look up a row in the database. Thus, the results from a query like1022
cannot be re-used to find results for10228
. It would be great if there was a way to specify that the cache must be exact (i.e., that the cache should only be used for lookups, not for searching).The text was updated successfully, but these errors were encountered: