wp_cache_supports()WP 6.1.0

Determines whether the object cache implementation supports a particular feature.

Хуков нет.


true|false. True if the feature is supported, false otherwise.


wp_cache_supports( $feature );
$feature(строка) (обязательный)
Name of the feature to check for. Possible values include: 'add_multiple', 'set_multiple', 'get_multiple', 'delete_multiple', 'flush_runtime', 'flush_group'.

Список изменений

С версии 6.1.0 Введена.

Код wp_cache_supports() WP 6.4.1

function wp_cache_supports( $feature ) {
	switch ( $feature ) {
		case 'add_multiple':
		case 'set_multiple':
		case 'get_multiple':
		case 'delete_multiple':
		case 'flush_runtime':
		case 'flush_group':
			return true;

			return false;