Documentation

CRM_Utils_Http
in package

Tags
copyright

CiviCRM LLC https://civicrm.org/licensing

Table of Contents

Methods

parseCacheControl()  : array<string|int, mixed>
parseExpiration()  : int|null
Parse the expiration time from a series of HTTP headers.

Methods

parseCacheControl()

public static parseCacheControl(string $value) : array<string|int, mixed>
Parameters
$value : string

Ex: "max-age=86400, public".

Return values
array<string|int, mixed>

Ex: Array("max-age"=>86400, "public"=>1).

parseExpiration()

Parse the expiration time from a series of HTTP headers.

public static parseExpiration(array<string|int, mixed> $headers) : int|null
Parameters
$headers : array<string|int, mixed>
Return values
int|null

Expiration tme as seconds since epoch, or NULL if not cacheable.


        
On this page

Search results