Object Sync for Salesforce Code Documentation

Object_Sync_Sf_WordPress_Transient
in package

Object_Sync_Sf_WordPress_Transient class.

Table of Contents

$cache_prefix  : string
Prefix for plugin cache keys
$name  : string
Name of the field that lists the cache keys
__construct()  : mixed
Constructor which sets cache options and the name of the field that lists this plugin's cache keys.
all_keys()  : array<string|int, mixed>
Get the transient that lists all the other transients for this plugin.
delete()  : bool
Delete the individual cache value
flush()  : array<string|int, mixed>
Delete the entire cache for this plugin
get()  : mixed
Get the individual cache value
set()  : mixed
Set individual transient, and add its key to the list of this plugin's transients.

Properties

Methods

__construct()

Constructor which sets cache options and the name of the field that lists this plugin's cache keys.

public __construct(string $name) : mixed
Parameters
$name : string

The name of the field that lists all cache keys.

Return values
mixed —

all_keys()

Get the transient that lists all the other transients for this plugin.

public all_keys() : array<string|int, mixed>
Return values
array<string|int, mixed> —

value of transient. Sets an empty array if the transient returns false.

delete()

Delete the individual cache value

public delete(string $cachekey) : bool
Parameters
$cachekey : string

the key for this cache item.

Return values
bool —

True if successful, false otherwise.

flush()

Delete the entire cache for this plugin

public flush() : array<string|int, mixed>
Return values
array<string|int, mixed> —

$result has the success result and how many entries were cleared.

get()

Get the individual cache value

public get(string $cachekey) : mixed
Parameters
$cachekey : string

the key for this cache item.

Return values
mixed —

value of transient. False of empty, otherwise array.

set()

Set individual transient, and add its key to the list of this plugin's transients.

public set(string $cachekey, mixed $value, int $cache_expiration) : mixed
Parameters
$cachekey : string

the key for this cache item.

$value : mixed

the value of the cache item.

$cache_expiration : int

How long the plugin key cache, and this individual item cache, should last before expiring.

Return values
mixed —

value of transient. False of empty, otherwise array.

Search results