OpCodeCache::isEnabled

public static OpCodeCache::isEnabled()

Checks if OpCodeCache is enabled.

Return value

bool TRUE if opcache is enabled, FALSE otherwise.

File

core/lib/Drupal/Component/Utility/OpCodeCache.php, line 18

Class

OpCodeCache
Provides helpers to handle PHP opcode caches.

Namespace

Drupal\Component\Utility

Code

1
2
3
public static function isEnabled() {
  return extension_loaded('Zend OPcache') && ini_get('opcache.enable');
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.