Added 1-day expiration for reviews requests to allow caching by Nginx
This commit is contained in:
parent
19131f0170
commit
639d7941e5
1 changed files with 1 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue