Overview
Configure proper HTTP caching for performance.
Parent Epic: #70
Priority: P2
Prerequisites
Next Issues (after this is complete)
- 7.4: Add Production Configuration
Acceptance Criteria
Implementation Notes
# In controllers
class StoriesController < ApplicationController
def index
expires_in 1.minute, public: true
# ...
end
end
class ItemsController < ApplicationController
def show
@item = HackerNewsClient.fetch_item(params[:id])
fresh_when(@item, public: true)
expires_in 5.minutes, public: true
# ...
end
end
Consider using stale? for conditional GET support.
Overview
Configure proper HTTP caching for performance.
Parent Epic: #70
Priority: P2
Prerequisites
Next Issues (after this is complete)
Acceptance Criteria
Implementation Notes
Consider using
stale?for conditional GET support.