Class: HTTP::Session::Cache::Status

Inherits:
Object
  • Object
show all
Defined in:
lib/http/session/cache/status.rb

Constant Summary collapse

HEADER_NAME =

rubocop:disable Layout/ExtraSpacing

"X-Httprb-Cache-Status"
HIT =

found in cache

"HIT"
REVALIDATED =

found in cache but stale, revalidated success

"REVALIDATED"
EXPIRED =

found in cache but stale, revalidated failure, served from the origin server

"EXPIRED"
MISS =

not found in cache, served from the origin server

"MISS"
UNCACHEABLE =

the request can not use cached response

"UNCACHEABLE"

Class Method Summary collapse

Class Method Details

.HIT?(v) ⇒ Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/http/session/cache/status.rb', line 14

def HIT?(v)
  v == HIT || v == REVALIDATED
end