README.md in pbbuilder-0.16.1 vs README.md in pbbuilder-0.16.2
- old
+ new
@@ -11,11 +11,11 @@
|---|---|---|
| set! | ✅ | ✅ |
| cache! | ✅ | ✅ |
| cache_if! | ✅ | ✅ |
| cache_root! | ✅| |
-| collection cache | ✅| |
+| fragment cache | ✅| ✅ |
| extract! | ✅ | ✅ |
| merge! | ✅ | ✅ |
| child! | ✅ | |
| array! | ✅ | |
| .call | ✅ | |
@@ -114,10 +114,18 @@
pb.cache_if! !admin?, "cache-key", expires_in: 10.minutes do
pb.name @person.name
end
```
-Fragment caching support is currently in the works.
+Fragment caching currently works through ActionView::CollectionRenderer and can be used only with the following syntax:
+
+```ruby
+pb.friends partial: "racers/racer", as: :racer, collection: @racers, cached: true
+```
+
+```ruby
+pb.friends "racers/racer", as: :racer, collection: @racers, cached: true
+```
## Installation
Add this line to your application's Gemfile:
```ruby