• Dylan Griffith's avatar
    Cache /search/count requests in the browser · 7c9da21e
    Dylan Griffith authored
    These requests are typically loaded by the same user repeatedly as they
    switch tabs on the search page. Considering that Elasticsearch indexing
    is only updated every 1-2 minutes anyway the 1 minute browser side cache
    shouldn't really be noticeable to users except for loading counts
    faster.
    
    This is also using a `private` cache (default for `expires_in`) so that
    it is not cached by intermediate proxies. This is important since each
    user's permissions is considered in a search.
    7c9da21e
search_controller_spec.rb 10.4 KB