ReuseQueryResults
Improve development environment speed. Reuse query results and clear cache when insert update and delete record. No more db requests.
Installation
Add this line to your application's Gemfile:
gem 'reuse_query_results', git: 'https://github.com/cookpad/reuse_query_results'
And then execute:
$ bundle
Or install it yourself as:
$ gem install reuse_query_results
Usage
run command on development environment .
REUSE_QUERY_RESULTS=1 rails server
Can share update status between separated applications.
# initializers/reuse_query_results.rb
memcache = ActiveSupport::Cache.lookup_store(:dalli_store, address)
ReuseQueryResults.storage = ReuseQueryResults::Storage.new(sync_client: memcache)
Contributing
- Fork it ( https://github.com/[my-github-username]/reuse_query_results/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request