Cache implements Standard_Service

Cache class.

Tags
author

Barn2 Plugins support@barn2.com

license

GPL-3.0

copyright

Barn2 Media Ltd

Interfaces, Classes and Traits

Standard_Service

Table of Contents

GROUPS_CACHE_KEY  = 'wcf_groups'
$integrations  : array<string|int, mixed>
List of active integrations.
add_integration()  : self
Add a single integration to the existing integrations array.
get_filter_groups()  : array<string|int, Group>|array<string|int, mixed>|null
Retrieve a cached list of filter groups.
get_group_by_id()  : Group|null
Retrieve a filter group by ID.
get_integrations()  : array<string|int, mixed>
Get the integrations array.
set_integrations()  : self
Set the integrations array.

Constants

GROUPS_CACHE_KEY

public mixed GROUPS_CACHE_KEY = 'wcf_groups'

Properties

$integrations

List of active integrations.

protected array<string|int, mixed> $integrations = []

Stores integrations that may be needed during search requests to handle customizations for plugins, themes and other compatibility needs.

Methods

add_integration()

Add a single integration to the existing integrations array.

public add_integration(string $key, mixed $value) : self
Parameters
$key : string

The integration key.

$value : mixed

The integration value.

Return values
self

get_filter_groups()

Retrieve a cached list of filter groups.

public static get_filter_groups() : array<string|int, Group>|array<string|int, mixed>|null
Return values
array<string|int, Group>|array<string|int, mixed>|null

get_group_by_id()

Retrieve a filter group by ID.

public static get_group_by_id(int $id) : Group|null
Parameters
$id : int
Return values
Group|null

get_integrations()

Get the integrations array.

public get_integrations() : array<string|int, mixed>

Integrations may be passed along search requests and are used as a way to track customizations necessary for plugins, themes and whatever else may be necessary.

Return values
array<string|int, mixed>

set_integrations()

Set the integrations array.

public set_integrations(array<string|int, mixed> $integrations) : self

Integrations may be passed along search requests and are used as a way to track customizations necessary for plugins, themes and whatever else may be necessary.

Parameters
$integrations : array<string|int, mixed>
Return values
self

Search results