Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use correct cache keys on the articles API index endpoint #5606

Merged
merged 2 commits into from
Jan 23, 2020
Merged

Use correct cache keys on the articles API index endpoint #5606

merged 2 commits into from
Jan 23, 2020

Commits on Jan 20, 2020

  1. Remove json_response

    rhymes committed Jan 20, 2020
    Configuration menu
    Copy the full SHA
    8b2dde1 View commit details
    Browse the repository at this point in the history
  2. Use correct cache keys on the articles API index endpoint

    Surrogate keys are about setting expectations on cache purging.
    
    Presently we use a combination of all parameters to set changing surrogate keys depending on the result of the `ArticleApiIndexService`. This approach has two limitations:
    
    - if two set of params lead to the same exact set of articles, we still create two different caches
    
    - deleted articles will remain for 24 hours in the cache because the cache key doesn't take the record keys into account
    
    By simply using record keys we make sure that different params leading to the same result set will share the same cache and that deleted keys won't appear anymore in the cache.
    rhymes committed Jan 20, 2020
    Configuration menu
    Copy the full SHA
    51877f0 View commit details
    Browse the repository at this point in the history