Added 1-day expiration for reviews requests to allow caching by Nginx

This commit is contained in:
Christoph Haas 2016-08-16 12:58:23 +02:00
parent 19131f0170
commit 639d7941e5

View file

@ -193,6 +193,7 @@ class PackagesController < ApplicationController
# Show an HTML partial with reviews of this package from the Ubuntu API
def reviews
expires_in 1.day, public: true
@reviews = Package.find_by_name!(params[:name]).ubuntu_reviews
render '_reviews', layout: false
end