Documentation

UriNormalizerCache
in package
implements CacheInterface

A PSR-16 compliant memory + (optional) sqlite database cache for the UriNormalizer class.

Tags
author

zozlak

Table of Contents

Interfaces

CacheInterface

Constants

DEFAULT_TTL  = "P1D"

Properties

$defaultTtl  : DateInterval
$memCache  : array<string, mixed>
$pdo  : PDO

Methods

__construct()  : mixed
asDateInterval()  : DateInterval
clear()  : bool
delete()  : bool
deleteMultiple()  : bool
get()  : mixed
getMultiple()  : iterable<string|int, mixed>
has()  : bool
set()  : bool
setMultiple()  : bool

Constants

Properties

Methods

__construct()

public __construct([string|null $sqliteFile = null ][, int|string|DateInterval $defaultTtl = self::DEFAULT_TTL ]) : mixed
Parameters
$sqliteFile : string|null = null
$defaultTtl : int|string|DateInterval = self::DEFAULT_TTL

asDateInterval()

public static asDateInterval(int|string|DateInterval $value) : DateInterval
Parameters
$value : int|string|DateInterval
Return values
DateInterval

delete()

public delete(string $key) : bool
Parameters
$key : string
Return values
bool

deleteMultiple()

public deleteMultiple(mixed $keys) : bool
Parameters
$keys : mixed
Return values
bool

get()

public get(string $key[, mixed $default = null ]) : mixed
Parameters
$key : string
$default : mixed = null

getMultiple()

public getMultiple(mixed $keys[, mixed $default = null ]) : iterable<string|int, mixed>
Parameters
$keys : mixed
$default : mixed = null
Return values
iterable<string|int, mixed>

has()

public has(string $key) : bool
Parameters
$key : string
Return values
bool

set()

public set(string $key, mixed $value[, null|int|DateInterval $ttl = null ]) : bool
Parameters
$key : string
$value : mixed
$ttl : null|int|DateInterval = null
Return values
bool

setMultiple()

public setMultiple(iterable<string|int, mixed> $values[, null|int|DateInterval $ttl = null ]) : bool
Parameters
$values : iterable<string|int, mixed>
$ttl : null|int|DateInterval = null
Return values
bool

        
On this page

Search results