diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2018-10-28 06:42:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-28 06:42:34 +0100 |
commit | 11b3ee4f4c1ede03f31dff4048283480ee22dd5f (patch) | |
tree | 7e69fcc5516c20a9a6258eae3b1f763414a9c024 /app/models/status.rb | |
parent | 93a1ab9030a358348addd55d5e18caaaec2d3a37 (diff) |
Reset status cache when status_stat or media_attachment updates (#9119)
* Reset status cache when status_stat or media_attachment updates Fix #8711 Media attachments are generally immutable, but admins can update the sensitive flag, and this would ensure the change is visible instantly. Same for updates to status stats. That is a regression from #8185, because even the correct updated_at fetched from a join doesn't seem to invalidate the cache. * Remove join from Status#cache_ids since it has no effect
Diffstat (limited to 'app/models/status.rb')
-rw-r--r-- | app/models/status.rb | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/app/models/status.rb b/app/models/status.rb index cb2c01040..32fedb924 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -240,10 +240,6 @@ class Status < ApplicationRecord before_validation :set_local class << self - def cache_ids - left_outer_joins(:status_stat).select('statuses.id, greatest(statuses.updated_at, status_stats.updated_at) AS updated_at') - end - def selectable_visibilities visibilities.keys - %w(direct limited) end |