Sha256: 52fb174f1a352290ca50fcac1c91a45d03c792781bf9325ab5204af414882b9d

Contents?: true

Size: 710 Bytes

Versions: 2

Compression:

Stored size: 710 Bytes

Contents

class HTTP::Session
  class Cache
    class Status
      # rubocop:disable Layout/ExtraSpacing
      HEADER_NAME = "X-Httprb-Cache-Status"
      HIT         = "HIT"         # found in cache
      REVALIDATED = "REVALIDATED" # found in cache but stale, revalidated success
      EXPIRED     = "EXPIRED"     # found in cache but stale, revalidated failure, served from the origin server
      MISS        = "MISS"        # not found in cache, served from the origin server
      UNCACHEABLE = "UNCACHEABLE" # the request can not use cached response
      # rubocop:enable Layout/ExtraSpacing

      class << self
        def HIT?(v)
          v == HIT || v == REVALIDATED
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ruby-http-session-2.1.0 lib/http/session/cache/status.rb
ruby-http-session-1.0.1 lib/http/session/cache/status.rb