Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Static Public Member Functions | List of all members
cache_store_interface Interface Reference
Inheritance diagram for cache_store_interface:
cache_store cachestore_apcu cachestore_dummy cachestore_file cachestore_memcached cachestore_mongodb cachestore_redis session_data_store static_data_store

Static Public Member Functions

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

Member Function Documentation

◆ are_requirements_met()

static 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_dummy, cachestore_apcu, cachestore_file, cachestore_memcached, cachestore_mongodb, cachestore_redis, cachestore_session, and cachestore_static.

◆ get_supported_features()

static cache_store_interface::get_supported_features ( array  $configuration = array())
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_dummy, cachestore_apcu, cachestore_file, cachestore_memcached, cachestore_mongodb, cachestore_redis, cachestore_session, and cachestore_static.

◆ get_supported_modes()

static cache_store_interface::get_supported_modes ( array  $configuration = array())
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_dummy, cachestore_apcu, cachestore_file, cachestore_memcached, cachestore_mongodb, cachestore_redis, cachestore_session, and cachestore_static.

◆ initialise_test_instance()

static cache_store_interface::initialise_test_instance ( cache_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
cache_definition$definition
Return values
cache_store|false

Implemented in cachestore_dummy, cachestore_apcu, cachestore_file, cachestore_memcached, cachestore_mongodb, cachestore_redis, cachestore_session, and cachestore_static.

◆ is_supported_mode()

static 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 cache_store::MODE_*

Implemented in cachestore_dummy, cachestore_apcu, cachestore_file, cachestore_memcached, cachestore_mongodb, cachestore_redis, cachestore_session, and cachestore_static.

◆ unit_test_configuration()

static 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_dummy, cachestore_apcu, cachestore_file, cachestore_memcached, cachestore_mongodb, cachestore_redis, cachestore_session, and cachestore_static.


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