Method: Rack::Client::Cache::CacheControl#shared_max_age

Defined in:
lib/rack/client/middleware/cache/cachecontrol.rb

#shared_max_ageObject Also known as: s_maxage

If a response includes an s-maxage directive, then for a shared cache (but not for a private cache), the maximum age specified by this directive overrides the maximum age specified by either the max-age directive or the Expires header. The s-maxage directive also implies the semantics of the proxy-revalidate directive. i.e., that the shared cache must not use the entry after it becomes stale to respond to a subsequent request without first revalidating it with the origin server. The s-maxage directive is always ignored by a private cache.



124
125
126
# File 'lib/rack/client/middleware/cache/cachecontrol.rb', line 124

def shared_max_age
  self['s-maxage'].to_i  if key?('s-maxage')
end