mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-22 22:06:50 +00:00
Merge pull request #1872 from aldreth/update-cache-documentation
Add warning in caching documentation [ci skip] Closes #1587
This commit is contained in:
commit
e8343a9049
@ -2,6 +2,12 @@
|
||||
|
||||
# Caching
|
||||
|
||||
## Warning
|
||||
|
||||
There is currently a problem with caching in AMS [Caching doesn't improve performance](https://github.com/rails-api/active_model_serializers/issues/1586). Adding caching _may_ slow down your application, rather than speeding it up. We suggest you benchmark any caching you implement before using in a production enviroment
|
||||
|
||||
___
|
||||
|
||||
To cache a serializer, call ```cache``` and pass its options.
|
||||
The options are the same options of ```ActiveSupport::Cache::Store```, plus
|
||||
a ```key``` option that will be the prefix of the object cache
|
||||
|
||||
Loading…
Reference in New Issue
Block a user