diff --git a/app/services/edge_cache/bust_user.rb b/app/services/edge_cache/bust_user.rb index 4047c34d8..259074aa3 100644 --- a/app/services/edge_cache/bust_user.rb +++ b/app/services/edge_cache/bust_user.rb @@ -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 diff --git a/spec/services/edge_cache/bust_user_spec.rb b/spec/services/edge_cache/bust_user_spec.rb index 71137c84c..6090ce93c 100644 --- a/spec/services/edge_cache/bust_user_spec.rb +++ b/spec/services/edge_cache/bust_user_spec.rb @@ -16,6 +16,7 @@ RSpec.describe EdgeCache::BustUser, type: :service do "/live/#{username}", "/live/#{username}?i=i", "/feed/#{username}", + "/api/users/#{user.id}", ] end