Open danmayer opened 6 months ago
I explored this for an hour. I'm not able and not sure how to proceed, here are my findings:
config/coverband.rb
is not straightforward, because Rails.cache
does not exist at loading time (config.store = Coverband::Adapters::ActiveSupportCacheStore.new(Rails.cache)
). Putting it in the initializer works fine.yeah it would definitely take some effort which is why I haven't had time for it. You are likely correct that it would end up being a breaking change... instead of raw_store with sets it would likely need to just serialize into JSON and use simple gets and sets so it might also be a bit slower....
Thanks for looking at it, I do hope to get back to this sometime.
We now have a number of adapters 2 redis, memcached, file, etc... If we built a good active support cache adapter it would work for all the traditional cache stores and AS::Cache has a file store as well as SolidCache which is a DB adapter so we would work for postgres, mysql, and sqlite (eventually).
This could reduce the number of custom adapters we need to maintain and possibly reduce the complexity.
It might not work for the HashRedisStore adapter which relies on LUA, so I would need to figure something out for that use case or rework how we use our cache store to not need the two very different methods coverband currently uses for coverage and storage.