json.cache! ['json_screenshots'], expires_in: 1.hour do json.screenshots @s do |s| p = s.package json.extract! s, :version json.extract! p, :maintainer, :name, :section, :maintainer_email, :homepage, :description json.url package_url(p.name, protocol: 'https') json.small_image_url "https://#{request.host_with_port}#{s.image.url(:thumb, timestamp: false)}" json.large_image_url "https://#{request.host_with_port}#{s.image.url(:large, timestamp: false)}" end end