When busting user cache, also clear the api response (#13465)

* When busting user cache, also clear the api response

This should fix #13293 by clearing both the UI copy and the api copy of the
user's page.

* Update spec to include the api path
This commit is contained in:
Daniel Uber 2021-04-22 09:16:15 -05:00 committed by GitHub
parent cd3e028f8b
commit 3e432c9047
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -4,7 +4,7 @@ module EdgeCache
return unless user
username = user.username
user_id = user.id
paths = [
"/#{username}",
"/#{username}?i=i",
@ -14,6 +14,7 @@ module EdgeCache
"/live/#{username}",
"/live/#{username}?i=i",
"/feed/#{username}",
"/api/users/#{user_id}",
]
cache_bust = EdgeCache::Bust.new

View file

@ -16,6 +16,7 @@ RSpec.describe EdgeCache::BustUser, type: :service do
"/live/#{username}",
"/live/#{username}?i=i",
"/feed/#{username}",
"/api/users/#{user.id}",
]
end