Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,16 @@ If `connects_to` is set, it will be passed directly.

If none of these are set, Solid Cache will use the `ActiveRecord::Base` connection pool. This means that cache reads and writes will be part of any wrapping database transaction.

### Single database configuration

Running Solid Cache in a separate database is recommended, but it's also possible to use one single database for both the app and the cache. Follow these steps:

1. Copy the contents of `db/cache_schema.rb` into a normal migration and delete `db/cache_schema.rb`
2. Remove the `database: cache` line from `config/cache.yml` in the production section
3. Migrate your database. You are ready to run `bin/rails server`

You won't have multiple databases, so `database.yml` doesn't need to have primary and cache database.

### Engine configuration

There are five options that can be set on the engine:
Expand Down