Reduce DB query for every request #906
|
Hi All, In debug I see that every request have: First, I'm trying to understand what is this query? Thanks for the help |
Answered by
jnunemaker
Jan 29, 2025
Replies: 2 comments 1 reply
|
One option I had is this: But it looks risky and not clean |
0 replies
|
Check out the optimization docs. https://www.flippercloud.io/docs/optimization We have several cache adapters. I’d recommend in memory. I use that on many of my higher throughput apps. For example, I have this on fireside: FLIPPER_SHARED_CACHE = ActiveSupport::Cache::MemoryStore.new
Flipper.configure do |config|
config.adapter do
Flipper::Adapters::ActiveSupportCacheStore.new(
Flipper::Adapters::ActiveRecord.new,
FLIPPER_SHARED_CACHE,
expires_in: 10.seconds
)
end
endI see the shared cache outside the adapter block so it is shared across threads if using puma. |
1 reply
Answer selected by
jonathan-anyword
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Check out the optimization docs.
https://www.flippercloud.io/docs/optimization
We have several cache adapters. I’d recommend in memory. I use that on many of my higher throughput apps.
For example, I have this on fireside:
I see the shared cache outside the adapter block so it is shared across threads if using puma.