mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Use filesystem-based SchemaCache in development (#12901)
In development we regularly restart/reload Rails, which wipes out the schema cache. This then has to be regenerated using DDL queries on the database. Instead, we can make use of the `rake db:schema:cache:dump` command. This will dump the schema cache to a YAML file, and then load it when needed. This is significantly faster than rebuilding the cache from DDL queries every time.
This commit is contained in:
@@ -12,6 +12,9 @@ Discourse::Application.configure do
|
||||
# Log error messages when you accidentally call methods on nil.
|
||||
config.eager_load = false
|
||||
|
||||
# Use the schema_cache.yml file generated during db:migrate (via db:schema:cache:dump)
|
||||
config.active_record.use_schema_cache_dump = true
|
||||
|
||||
# Show full error reports and disable caching
|
||||
config.consider_all_requests_local = true
|
||||
config.action_controller.perform_caching = false
|
||||
|
||||
Reference in New Issue
Block a user