Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
Google_Http_CacheParser Class Reference

Static Public Member Functions

static isExpired (Google_Http_Request $resp)
 
static isRequestCacheable (Google_Http_Request $resp)
 Check if an HTTP request can be cached by a private local cache.
 
static isResponseCacheable (Google_Http_Request $resp)
 Check if an HTTP response can be cached by a private local cache.
 
static mustRevalidate (Google_Http_Request $response)
 Determine if a cache entry should be revalidated with by the origin.
 

Static Public Attributes

static $CACHEABLE_HTTP_METHODS = array('GET', 'HEAD')
 
static $CACHEABLE_STATUS_CODES = array('200', '203', '300', '301')
 

Member Function Documentation

◆ isExpired()

static Google_Http_CacheParser::isExpired ( Google_Http_Request $resp)
static
Parameters
Google_Http_Request$resp
Return values
boolTrue if the HTTP response is considered to be expired. False if it is considered to be fresh.

◆ isRequestCacheable()

static Google_Http_CacheParser::isRequestCacheable ( Google_Http_Request $resp)
static

Check if an HTTP request can be cached by a private local cache.

Parameters
Google_Http_Request$resp
Return values
boolTrue if the request is cacheable. False if the request is uncacheable.

◆ isResponseCacheable()

static Google_Http_CacheParser::isResponseCacheable ( Google_Http_Request $resp)
static

Check if an HTTP response can be cached by a private local cache.

Parameters
Google_Http_Request$resp
Return values
boolTrue if the response is cacheable. False if the response is un-cacheable.

◆ mustRevalidate()

static Google_Http_CacheParser::mustRevalidate ( Google_Http_Request $response)
static

Determine if a cache entry should be revalidated with by the origin.

Parameters
Google_Http_Request$response
Return values
boolTrue if the entry is expired, else return false.

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