Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

improve public cache of home page

  • Loading branch information...
commit c5377f2e021fa31c86043bdefa5b3995772dec7d 1 parent 903090d
@mislav authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  app/controllers/movies_controller.rb
View
3  app/controllers/movies_controller.rb
@@ -20,7 +20,8 @@ def index
@movies = Movie.find(:directors => @director).sort(:year, :desc).page(params[:page])
freshness_from_cursor @movies
else
- if logged_in? or stale?(:last_modified => Movie.last_watch_created_at)
+ expires_in 5.minutes unless logged_in?
+ if logged_in? or stale?(last_modified: Movie.last_watch_created_at, public: true)
@movies = Movie.last_watched
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.