Merge remote-tracking branch 'parent/main' into upstream-20240408
This commit is contained in:
commit
45c5c7b055
27 changed files with 326 additions and 121 deletions
17
app/models/concerns/custom_filter_cache.rb
Normal file
17
app/models/concerns/custom_filter_cache.rb
Normal file
|
@ -0,0 +1,17 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module CustomFilterCache
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
included do
|
||||
after_commit :invalidate_cache!
|
||||
before_destroy :prepare_cache_invalidation!
|
||||
before_save :prepare_cache_invalidation!
|
||||
|
||||
delegate(
|
||||
:invalidate_cache!,
|
||||
:prepare_cache_invalidation!,
|
||||
to: :custom_filter
|
||||
)
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue