Fixed 500 errors from home page

Fixed caching, sentence search results, autosuggest, and frequent words
view.