README.md in autobots-0.2.0 vs README.md in autobots-0.2.1
- old
+ new
@@ -116,9 +116,16 @@
### Caching
We can get large performance boosts by caching our serializable data. Caching is straight forward:
+ class ProjectAssembler < Autobots::Assembler
+ # some sort of ActiveSupport::CacheStore
+ self.cache = Rails.cache
+ end
+
+Alternatively, you can set the cache on an instance:
+
# some sort of ActiveSupport::CacheStore
cache = Rails.cache
assembler = ProjectAssembler.new(project_ids, cache: cache)
The cache store must implement `read_multi` as we use [`bulk_cache_fetcher` gem](https://github.com/justinweiss/bulk_cache_fetcher/)