Created
October 20, 2014 20:22
-
-
Save joaomdmoura/f85a38fe10c1723f00e1 to your computer and use it in GitHub Desktop.
AMS Cache Support Proposal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PostSerializer < ActiveModel::Serializer | |
cache cache_key: 'my-posts', expires_in: 3.days | |
attributes :title, :body | |
has_many :comments | |
url :post | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment