Table_Cache
Handles the caching for post tables.
There are 2 types of caching used:
- Table caching: this is used for lazy load tables where we need to initially create the table, then later fetch the table by ID to fetch the actual posts.
- Data caching: this is used to cache the data in a table, and is enabled or disabled using the 'cache' option in the shortcode, or from the plugin settings.
Tags
Table of Contents
- TABLE_CACHE_EXPIRY = DAY_IN_SECONDS
- $args : mixed
- $id : mixed
- $query : mixed
- __construct() : mixed
- add_table() : mixed
- delete_data() : mixed
- get_data() : mixed
- get_table() : mixed
- load_from_cache() : mixed
- update_data() : mixed
- update_table() : mixed
- data_caching_enabled() : mixed
- get_data_cache_key() : mixed
- get_table_cache_key() : mixed
- table_caching_enabled() : mixed
Constants
TABLE_CACHE_EXPIRY
public
mixed
TABLE_CACHE_EXPIRY
= DAY_IN_SECONDS
Properties
$args
public
mixed
$args
$id
public
mixed
$id
$query
public
mixed
$query
Methods
__construct()
public
__construct(mixed $id, Table_Args $args, Table_Query $query) : mixed
Parameters
- $id : mixed
- $args : Table_Args
- $query : Table_Query
Return values
mixed —add_table()
public
add_table() : mixed
Return values
mixed —delete_data()
public
delete_data() : mixed
Return values
mixed —get_data()
public
get_data() : mixed
Return values
mixed —get_table()
public
static get_table(mixed $id) : mixed
Parameters
- $id : mixed
Return values
mixed —load_from_cache()
public
static load_from_cache(mixed $id) : mixed
Parameters
- $id : mixed
Tags
Return values
mixed —update_data()
public
update_data(mixed $data) : mixed
Parameters
- $data : mixed
Return values
mixed —update_table()
public
update_table([mixed $update_totals = false ]) : mixed
Parameters
- $update_totals : mixed = false
Return values
mixed —data_caching_enabled()
private
data_caching_enabled() : mixed
Return values
mixed —get_data_cache_key()
private
get_data_cache_key() : mixed
Return values
mixed —get_table_cache_key()
private
get_table_cache_key() : mixed
Return values
mixed —table_caching_enabled()
private
table_caching_enabled() : mixed