https://github.com/cookpad/reuse_query_results
reuse mysql query results
https://github.com/cookpad/reuse_query_results
Last synced: 5 months ago
JSON representation
reuse mysql query results
- Host: GitHub
- URL: https://github.com/cookpad/reuse_query_results
- Owner: cookpad
- License: mit
- Created: 2015-05-07T01:07:46.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-05-28T11:17:40.000Z (almost 10 years ago)
- Last Synced: 2023-04-09T03:41:04.754Z (about 2 years ago)
- Language: Ruby
- Size: 227 KB
- Stars: 11
- Watchers: 135
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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:
```ruby
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.
```ruby
# initializers/reuse_query_results.rb
memcache = ActiveSupport::Cache.lookup_store(:dalli_store, address)
ReuseQueryResults.storage = ReuseQueryResults::Storage.new(sync_client: memcache)```
## Contributing
1. Fork it ( https://github.com/[my-github-username]/reuse_query_results/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request