Table_Cache_Handler implements Registerable, Standard_Service

Handle table cache compat with access control.

Tags
author

Barn2 Plugins support@barn2.com

license

GPL-3.0

copyright

Barn2 Media Ltd

Interfaces, Classes and Traits

Registerable
Standard_Service

Table of Contents

maybe_disable_caching()  : bool
Maybe disable caching.
on_global_settings_updated()  : mixed
Clear cache when global settings are updated.
on_post_meta_updated()  : mixed
Clear cache when post meta is updated.
on_term_meta_updated()  : mixed
Clear cache when term meta is updated.
register()  : mixed
{@inheritdoc}

Methods

maybe_disable_caching()

Maybe disable caching.

public static maybe_disable_caching(bool $cache_enabled) : bool
Parameters
$cache_enabled : bool

Whether to use data caching.

Tags
Return values
bool

on_global_settings_updated()

Clear cache when global settings are updated.

public static on_global_settings_updated() : mixed
Tags
Return values
mixed

on_post_meta_updated()

Clear cache when post meta is updated.

public static on_post_meta_updated(int $meta_id, int $object_id, string $meta_key, mixed $meta_value) : mixed
Parameters
$meta_id : int

ID of updated metadata entry.

$object_id : int

ID of the object metadata is for.

$meta_key : string

Metadata key.

$meta_value : mixed

Metadata value.

Tags
Return values
mixed

on_term_meta_updated()

Clear cache when term meta is updated.

public static on_term_meta_updated(int $meta_id, int $object_id, string $meta_key, mixed $meta_value) : mixed
Parameters
$meta_id : int

ID of updated metadata entry.

$object_id : int

ID of the object metadata is for.

$meta_key : string

Metadata key.

$meta_value : mixed

Metadata value.

Tags
Return values
mixed

Search results