You are here

function _acquia_purge_diagnostics_backends_statestorage in Acquia Purge 7

Loaded state storage.

Parameters

string $t: Name of the t() function to call.

AcquiaPurgeService $service: The Acquia Purge service.

Return value

array Associative array with the following elements:

1 string reference to '_acquia_purge_diagnostics_backends_statestorage'
acquia_purge_acquia_purge_diagnostics in ./acquia_purge.module
Implements hook_acquia_purge_diagnostics().

File

./acquia_purge.diagnostics.inc, line 256
Diagnostic self-tests and reports that aim to prevent runtime misery.

Code

function _acquia_purge_diagnostics_backends_statestorage($t, $service) {
  $test = array(
    'title' => $t('Loaded state storage'),
  );
  if ($service
    ->hostingInfo()
    ->isMemcachedUsed()) {
    $test['severity'] = ACQUIA_PURGE_SEVLEVEL_INFO;
    $test['value'] = 'Memcached';
  }
  else {
    $test['severity'] = ACQUIA_PURGE_SEVLEVEL_WARNING;
    $test['value'] = $t('File: @p', array(
      '@p' => ACQUIA_PURGE_STATE_FILE,
    ));
    $test['description'] = $t('It is highly recommended to setup Memcached for' . ' your website. Cache invalidation will benefit from it, but the' . ' overall benefit to your site is far larger. https://docs.acquia.com' . '/acquia-cloud/performance/memcached');
  }
  return $test;
}