Sha256: 3a364b8003b03b3ffa60e7b71ef1e81d4264c79837d73fb4f32e68551a45349e

Contents?: true

Size: 328 Bytes

Versions: 22

Compression:

Stored size: 328 Bytes

Contents

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

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
shipit-engine-0.5.2 app/controllers/concerns/api/cacheable.rb
shipit-engine-0.5.1 app/controllers/concerns/api/cacheable.rb
shipit-engine-0.5.0 app/controllers/concerns/api/cacheable.rb
shipit-engine-0.4.10 app/controllers/concerns/api/cacheable.rb
shipit-engine-0.4.9 app/controllers/concerns/api/cacheable.rb
shipit-engine-0.4.8 app/controllers/concerns/api/cacheable.rb
shipit-engine-0.4.7 app/controllers/concerns/api/cacheable.rb
shipit-engine-0.4.6 app/controllers/concerns/api/cacheable.rb
shipit-engine-0.4.5 app/controllers/concerns/api/cacheable.rb
shipit-engine-0.4.4 app/controllers/concerns/api/cacheable.rb
shipit-engine-0.4.3 app/controllers/concerns/api/cacheable.rb
shipit-engine-0.4.2 app/controllers/concerns/api/cacheable.rb
shipit-engine-0.4.1 app/controllers/concerns/api/cacheable.rb
shipit-engine-0.4.0 app/controllers/concerns/api/cacheable.rb
shipit-engine-0.3.1 app/controllers/concerns/api/cacheable.rb
shipit-engine-0.3.0 app/controllers/concerns/api/cacheable.rb
shipit-engine-0.2.3 app/controllers/concerns/api/cacheable.rb
shipit-engine-0.2.2 app/controllers/concerns/api/cacheable.rb
shipit-engine-0.2.1 app/controllers/concerns/api/cacheable.rb
shipit-engine-0.2.0 app/controllers/concerns/api/cacheable.rb