No_Cache_Options
Trait No_Cache_Options
Wrappers around the WordPress options API that bypasses caching, ensuring that data is always read from and written to the database.
This solves the issue of long running processes sometimes developing stale caches in memory, then failing to update the database when values change.
- Full name:
\BigCommerce\Import\No_Cache_Options
Methods
get_option
protected get_option(string $option, bool $default = false): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$option | string | |
$default | bool |
update_option
protected update_option(string $option, mixed $value, bool $autoload = false): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$option | string | |
$value | mixed | |
$autoload | bool |
add_option
protected add_option(string $option, mixed $value, bool $autoload = false): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$option | string | |
$value | mixed | |
$autoload | bool |
delete_option
protected delete_option(string $option): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$option | string |
Automatically generated on 2025-01-21