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:
parent
cd3e028f8b
commit
3e432c9047
2 changed files with 3 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ RSpec.describe EdgeCache::BustUser, type: :service do
|
|||
"/live/#{username}",
|
||||
"/live/#{username}?i=i",
|
||||
"/feed/#{username}",
|
||||
"/api/users/#{user.id}",
|
||||
]
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue