You say in the comments that “This is a small data set” of keywords. Thus, it may be appropriate for the client to request the entire list as soon as the user begins to enter text in the field, and then JavaScript responds to changes in user input on the client side.
This server gets into the field on the page (and only if the user enters this field), and you can cache it on the server so that it rarely gets into the database.
Edit: Caching on the server is a big win, because the list is the same for every request and for all users, but even better, this means that you can cache the list in the client’s browser using the Expires or Etag with a suitable response period. Thus, the user can get unlimited autocomplete in just one (well-cached) server hit for the entire period of the browser cache.
source share