KMP PHP API Reference

TenantAwareCacheInterface

Tenant-safe facade for application cache access.

Table of Contents

Methods

add()  : bool
Add to the active tenant scope when absent.
delete()  : bool
Delete from the active tenant scope.
deletePlatform()  : bool
Delete from the shared platform scope.
platformKey()  : string
Return the shared platform cache key for a logical key.
read()  : mixed
Read from the active tenant scope.
readPlatform()  : mixed
Read from the shared platform scope.
remember()  : mixed
Read or compute a value in the active tenant scope.
tenantKey()  : string
Return the active tenant's cache key for a logical key.
write()  : bool
Write to the active tenant scope.
writePlatform()  : bool
Write to the shared platform scope.

Methods

add()

Add to the active tenant scope when absent.

public add(string $key, mixed $value[, string $config = 'default' ]) : bool
Parameters
$key : string
$value : mixed
$config : string = 'default'
Return values
bool

delete()

Delete from the active tenant scope.

public delete(string $key[, string $config = 'default' ]) : bool
Parameters
$key : string
$config : string = 'default'
Return values
bool

deletePlatform()

Delete from the shared platform scope.

public deletePlatform(string $key[, string $config = 'default' ]) : bool
Parameters
$key : string
$config : string = 'default'
Return values
bool

platformKey()

Return the shared platform cache key for a logical key.

public platformKey(string $key) : string
Parameters
$key : string
Return values
string

read()

Read from the active tenant scope.

public read(string $key[, string $config = 'default' ]) : mixed
Parameters
$key : string
$config : string = 'default'

readPlatform()

Read from the shared platform scope.

public readPlatform(string $key[, string $config = 'default' ]) : mixed
Parameters
$key : string
$config : string = 'default'

remember()

Read or compute a value in the active tenant scope.

public remember(string $key, Closure $default[, string $config = 'default' ]) : mixed
Parameters
$key : string
$default : Closure
$config : string = 'default'

tenantKey()

Return the active tenant's cache key for a logical key.

public tenantKey(string $key) : string
Parameters
$key : string
Return values
string

write()

Write to the active tenant scope.

public write(string $key, mixed $value[, string $config = 'default' ]) : bool
Parameters
$key : string
$value : mixed
$config : string = 'default'
Return values
bool

writePlatform()

Write to the shared platform scope.

public writePlatform(string $key, mixed $value[, string $config = 'default' ]) : bool
Parameters
$key : string
$value : mixed
$config : string = 'default'
Return values
bool
On this page

Search results