Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250620) (7d9030acd6e)
core_cache\store_interface Interface Reference
Inheritance diagram for core_cache\store_interface:
core_cache\store cachestore_apcu cachestore_file cachestore_redis core_cache\dummy_cachestore session_data_store static_data_store cachestore_session cachestore_static

Static Public Member Functions

static are_requirements_met ()
 Static method to check if the store requirements are met.
 
static get_supported_features (array $configuration=[])
 Returns the supported features as a binary flag.
 
static get_supported_modes (array $configuration=[])
 Returns the supported modes as a binary flag.
 
static initialise_test_instance (definition $definition)
 Generates an instance of the cache store that can be used for testing.
 
static is_supported_mode ($mode)
 Static method to check if a store is usable with the given mode.
 
static unit_test_configuration ()
 Generates the appropriate configuration required for unit testing.
 

Detailed Description

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ are_requirements_met()

static core_cache\store_interface::are_requirements_met ( )
static

Static method to check if the store requirements are met.

Return values
boolTrue if the stores software/hardware requirements have been met and it can be used. False otherwise.

Implemented in cachestore_apcu, cachestore_file, cachestore_redis, cachestore_session, cachestore_static, and core_cache\dummy_cachestore.

◆ get_supported_features()

static core_cache\store_interface::get_supported_features ( array $configuration = [])
static

Returns the supported features as a binary flag.

Parameters
array$configurationThe configuration of a store to consider specifically.
Return values
intThe supported features.

Implemented in cachestore_apcu, cachestore_file, cachestore_redis, cachestore_session, cachestore_static, and core_cache\dummy_cachestore.

◆ get_supported_modes()

static core_cache\store_interface::get_supported_modes ( array $configuration = [])
static

Returns the supported modes as a binary flag.

Parameters
array$configurationThe configuration of a store to consider specifically.
Return values
intThe supported modes.

Implemented in cachestore_apcu, cachestore_file, cachestore_redis, cachestore_session, cachestore_static, and core_cache\dummy_cachestore.

◆ initialise_test_instance()

static core_cache\store_interface::initialise_test_instance ( definition $definition)
static

Generates an instance of the cache store that can be used for testing.

Returns an instance of the cache store, or false if one cannot be created.

Parameters
definition$definition
Return values
store_interface|false

Implemented in cachestore_apcu, cachestore_file, cachestore_redis, cachestore_session, cachestore_static, and core_cache\dummy_cachestore.

◆ is_supported_mode()

static core_cache\store_interface::is_supported_mode ( $mode)
static

Static method to check if a store is usable with the given mode.

Parameters
int$modeOne of store::MODE_*

Implemented in cachestore_apcu, cachestore_file, cachestore_redis, cachestore_session, cachestore_static, and core_cache\dummy_cachestore.

◆ unit_test_configuration()

static core_cache\store_interface::unit_test_configuration ( )
static

Generates the appropriate configuration required for unit testing.

Return values
arrayArray of unit test configuration data to be used by initialise().

Implemented in cachestore_apcu, cachestore_file, cachestore_redis, cachestore_session, cachestore_static, and core_cache\dummy_cachestore.


The documentation for this interface was generated from the following file: