Skip to content

Commit e4a8e04

Browse files
author
Sergio Gernyak
committed
📚🔖updated readme
Bumped to v0.2.0
1 parent 10e22cd commit e4a8e04

2 files changed

Lines changed: 23 additions & 1 deletion

File tree

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,28 @@ in admin panel but also with keeping in mind about next enhancements.
141141

142142
[Read there](https://github.com/alterego-labs/settingify/wiki/Localization-feature)
143143

144+
## Caching feature (since v0.2.0)
145+
146+
### Configuration
147+
148+
```ruby
149+
Settingify.config do |config|
150+
config.setup_cache provider: Rails.cache
151+
end
152+
```
153+
154+
You can use some custom providers. The provider should to have the following interface:
155+
156+
- `#fetch(key, &block)`
157+
- `#delete_matched(pattern)`
158+
159+
160+
### Usage in the wild
161+
162+
After you've set up caching in the initializer you do not need something another to get caching worked.
163+
The only thing you may need - in the host application after some setting has been changed you need
164+
to call cache clearnup. For that there is an built-in API: `Settingify.clear_cache`.
165+
144166
## Testing
145167

146168
Because localization feature affects on Setting class by unchangable

lib/settingify/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module Settingify
2-
VERSION = "0.1.1"
2+
VERSION = "0.2.0"
33
end

0 commit comments

Comments
 (0)