Skip to content

Commit be8f136

Browse files
committed
Add warning in caching documentation
1 parent 6567989 commit be8f136

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)