Skip to content

Commit e8343a9

Browse files
authored
Merge pull request #1872 from aldreth/update-cache-documentation
Add warning in caching documentation [ci skip] Closes #1587
2 parents 6567989 + be8f136 commit e8343a9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/general/caching.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
# Caching
44

5+
## Warning
6+
7+
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
8+
9+
___
10+
511
To cache a serializer, call ```cache``` and pass its options.
612
The options are the same options of ```ActiveSupport::Cache::Store```, plus
713
a ```key``` option that will be the prefix of the object cache

0 commit comments

Comments
 (0)