Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
pip._vendor.cachecontrol.heuristics.LastModified Class Reference
Inheritance diagram for pip._vendor.cachecontrol.heuristics.LastModified:
Inheritance graph
[legend]
Collaboration diagram for pip._vendor.cachecontrol.heuristics.LastModified:
Collaboration graph
[legend]

Public Member Functions

dict[str, str] update_headers (self, HTTPResponse resp)
 
str|None warning (self, HTTPResponse resp)
 
- Public Member Functions inherited from pip._vendor.cachecontrol.heuristics.BaseHeuristic
HTTPResponse apply (self, HTTPResponse response)
 

Static Public Attributes

dict cacheable_by_default_statuses
 

Detailed Description

If there is no Expires header already, fall back on Last-Modified
using the heuristic from
http://tools.ietf.org/html/rfc7234#section-4.2.2
to calculate a reasonable value.

Firefox also does something like this per
https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching_FAQ
http://lxr.mozilla.org/mozilla-release/source/netwerk/protocol/http/nsHttpResponseHead.cpp#397
Unlike mozilla we limit this to 24-hr.

Member Function Documentation

◆ update_headers()

dict[str, str] pip._vendor.cachecontrol.heuristics.LastModified.update_headers (   self,
HTTPResponse  response 
)
Update the response headers with any new headers.

NOTE: This SHOULD always include some Warning header to
      signify that the response was cached by the client, not
      by way of the provided headers.

Reimplemented from pip._vendor.cachecontrol.heuristics.BaseHeuristic.

◆ warning()

str | None pip._vendor.cachecontrol.heuristics.LastModified.warning (   self,
HTTPResponse  response 
)
Return a valid 1xx warning header value describing the cache
adjustments.

The response is provided too allow warnings like 113
http://tools.ietf.org/html/rfc7234#section-5.5.4 where we need
to explicitly say response is over 24 hours old.

Reimplemented from pip._vendor.cachecontrol.heuristics.BaseHeuristic.

Member Data Documentation

◆ cacheable_by_default_statuses

dict pip._vendor.cachecontrol.heuristics.LastModified.cacheable_by_default_statuses
static
Initial value:
= {
200,
203,
204,
206,
300,
301,
404,
405,
410,
414,
501,
}

The documentation for this class was generated from the following file: