ClassesBigCommerceImportNo Cache Options

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:

ParameterTypeDescription
$optionstring
$defaultbool

update_option

protected update_option(string $option, mixed $value, bool $autoload = false): bool

Parameters:

ParameterTypeDescription
$optionstring
$valuemixed
$autoloadbool

add_option

protected add_option(string $option, mixed $value, bool $autoload = false): bool

Parameters:

ParameterTypeDescription
$optionstring
$valuemixed
$autoloadbool

delete_option

protected delete_option(string $option): bool

Parameters:

ParameterTypeDescription
$optionstring


Automatically generated on 2025-01-21