Skip to content

Commit

Permalink
Add flipper caching
Browse files Browse the repository at this point in the history
  • Loading branch information
ericsaupe committed Dec 15, 2024
1 parent 5b4a6d5 commit 57a64d8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ gem "bootsnap", ">= 1.4.4", require: false
gem "cssbundling-rails", ">= 0.1.0"
gem "flipper"
gem "flipper-active_record"
gem "flipper-active_support_cache_store"
gem "good_job", "~> 4.0"
gem "sentry-ruby"
gem "sentry-rails"
Expand Down
4 changes: 4 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@ GEM
flipper-active_record (1.3.2)
activerecord (>= 4.2, < 9)
flipper (~> 1.3.2)
flipper-active_support_cache_store (1.3.2)
activesupport (>= 4.2, < 9)
flipper (~> 1.3.2)
fugit (1.11.1)
et-orbi (~> 1, >= 1.2.11)
raabro (~> 1.4)
Expand Down Expand Up @@ -417,6 +420,7 @@ DEPENDENCIES
faker
flipper
flipper-active_record
flipper-active_support_cache_store
good_job (~> 4.0)
image_processing (~> 1.12)
jbuilder (~> 2.11)
Expand Down
8 changes: 8 additions & 0 deletions config/initializers/flipper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Flipper.configure do |config|
config.adapter do
Flipper::Adapters::ActiveSupportCacheStore.new(
Flipper::Adapters::Memory.new,
Rails.cache
)
end
end

0 comments on commit 57a64d8

Please sign in to comment.