Menu

## Object_Sync_Sf_WordPress_Transient
in package

class-object-sync-sf-wordpress-transient.php : 14

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

#### $cache_prefix

class-object-sync-sf-wordpress-transient.php : 28

Prefix for plugin cache keys

`public string $cache_prefix`

#### $name

class-object-sync-sf-wordpress-transient.php : 21

Name of the field that lists the cache keys

`public string $name`

### Methods

#### __construct()

class-object-sync-sf-wordpress-transient.php : 35

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()

class-object-sync-sf-wordpress-transient.php : 45

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()

class-object-sync-sf-wordpress-transient.php : 91

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()

class-object-sync-sf-wordpress-transient.php : 102

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()

class-object-sync-sf-wordpress-transient.php : 79

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()

class-object-sync-sf-wordpress-transient.php : 61

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