coverband
coverband copied to clipboard
Add memcached adapter
Description
This pull request introduces a new adapter for Coverband, enabling the use of Memcached as a storage backend. This addition allows users of Coverband to leverage the distributed memory object caching system, which can be particularly useful for applications that are already using Memcached for other forms of caching. This can help in maintaining consistency in the tools used across an application and can potentially improve performance for coverage data storage and retrieval.
Changes
- New File:
lib/coverband/adapters/memcached_store.rb
Usage
To use the Memcached adapter, users need to initialize it with a Memcached client instance and optionally specify a namespace for the keys. This flexibility allows for easy integration into existing projects that might already be using Memcached.
Coverband.configure do |config|
memcached = Memcached.new([...])
config.store = Coverband::Adapters::MemcachedStore.new(memcached, memcached_namespace: 'my_app_coverband')
config.track_views = false
end
Notes
Unsupported Operations: raw_store and migrate
Nice, adding memcache support has been on my list for awhile now. I will take a closer look and likely pull this in... I have more been moving towards implementing a generic active support cache store adapter for Coverband which would allow folks to configure anything active support cache supports to use with Coverband.
I am looking to get this integrated as it is taking me way longer to wrap up my other PR and I won't get to the active support adapter that soon.
thanks so much @prastamaha I am so sorry it took me so long to get back to you on this