Sha256: 7730aed8a4911ea2117bca6793c74b06496a8f894fae18e97552c7634346f33f

Contents?: true

Size: 1.33 KB

Versions: 4

Compression:

Stored size: 1.33 KB

Contents

# ActiveRecordMultipleQueryCache

Enable the query_cache for your abstract base class inherited from ActiveRecord::Base.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'active_record_multiple_query_cache'
```

## Usage

```ruby
# your custom base class
class ApplicationSlaveRecord < ActiveRecord::Base
  self.abstract_class = true
  establish_connection(:"slave_#{Rails.env}")
end

# config/initializers/active_record_multiple_query_cache.rb
ActiveRecordMultipleQueryCache.install_query_cache('ApplicationSlaveRecord')
```

## Development

After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/alpaca-tc/active_record_multiple_query_cache.

## License

The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
active_record_multiple_query_cache-0.1.3 README.md
active_record_multiple_query_cache-0.1.2 README.md
active_record_multiple_query_cache-0.1.1 README.md
active_record_multiple_query_cache-0.1.0 README.md