Replies: 1 comment
-
|
Hey sorry I missed this. I'd use the active support cache adapter with memory if you want cache. Memory is more for storage in process for tests and such. I do this on one of my apps: 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,
10.seconds
)
end
endThat makes it so the memory cache is shared per process across all threads. The memory adapter is thread safe by default. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, in the past I ended up disabling preloading because it was taking too long to load, similar to what https://www.flippercloud.io/docs/optimization mentions. I was using redis cache adapter at the time. Now I'm wondering if it'd make more sense to use the memory adapter + enabling preloading. Only that I haven't used the memory adapter before, so I'm not sure how reliable is it. Is there a reason not do use the memory adapter as cache?
Beta Was this translation helpful? Give feedback.
All reactions