README.md in rails-settings-cached-0.6.6 vs README.md in rails-settings-cached-0.7.0

- old
+ new

@@ -26,13 +26,28 @@ ``` If you want custom model name: ```bash +$ rails g settings:install +``` + +Or use a custom name: + +```bash $ rails g settings:install SiteConfig ``` +You will get `app/models/setting.rb` + +```rb +class Setting < RailsSettings::Base + source Rails.root.join("config/app.yml") + # cache_prefix { "v1" } +end +``` + Now just put that migration in the database with: ```bash rake db:migrate ``` @@ -175,9 +190,11 @@ | Return nil ``` ## Change cache key + +When `config/app.yml` has changed, you may need change the cache prefix to expires caches. ```ruby class Setting < RailsSettings::Base cache_prefix { 'you-prefix' } ...