Sha256: a7c37dde935c748d2dbb6a4cb76d88c540199912a3c986820112ea5f7bd4450a

Contents?: true

Size: 366 Bytes

Versions: 46

Compression:

Stored size: 366 Bytes

Contents

module Shipit
  module Api
    module Cacheable
      def render_resources(resources, *)
        super if stale?(etag: resources, last_modified: resources.map(&:updated_at).max, template: false)
      end

      def render_resource(resource, *)
        super if stale?(etag: resource, last_modified: resource.updated_at, template: false)
      end
    end
  end
end

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
shipit-engine-0.31.0 app/controllers/concerns/shipit/api/cacheable.rb
shipit-engine-0.30.0 app/controllers/concerns/shipit/api/cacheable.rb
shipit-engine-0.29.0 app/controllers/concerns/shipit/api/cacheable.rb
shipit-engine-0.28.1 app/controllers/concerns/shipit/api/cacheable.rb
shipit-engine-0.28.0 app/controllers/concerns/shipit/api/cacheable.rb
shipit-engine-0.27.1 app/controllers/concerns/shipit/api/cacheable.rb
shipit-engine-0.27.0 app/controllers/concerns/shipit/api/cacheable.rb
shipit-engine-0.26.0 app/controllers/concerns/shipit/api/cacheable.rb
shipit-engine-0.25.1 app/controllers/concerns/shipit/api/cacheable.rb
shipit-engine-0.25.0 app/controllers/concerns/shipit/api/cacheable.rb
shipit-engine-0.24.0 app/controllers/concerns/shipit/api/cacheable.rb
shipit-engine-0.23.1 app/controllers/concerns/shipit/api/cacheable.rb
shipit-engine-0.23.0 app/controllers/concerns/shipit/api/cacheable.rb
shipit-engine-0.22.0 app/controllers/concerns/shipit/api/cacheable.rb
shipit-engine-0.21.0 app/controllers/concerns/shipit/api/cacheable.rb
shipit-engine-0.20.1 app/controllers/concerns/shipit/api/cacheable.rb
shipit-engine-0.20.0 app/controllers/concerns/shipit/api/cacheable.rb
shipit-engine-0.19.0 app/controllers/concerns/shipit/api/cacheable.rb
shipit-engine-0.18.1 app/controllers/concerns/shipit/api/cacheable.rb
shipit-engine-0.18.0 app/controllers/concerns/shipit/api/cacheable.rb