8.5.x SourcePluginBase.php SourcePluginBase::getCache()
8.0.x SourcePluginBase.php SourcePluginBase::getCache()
8.1.x SourcePluginBase.php SourcePluginBase::getCache()
8.2.x SourcePluginBase.php SourcePluginBase::getCache()
8.3.x SourcePluginBase.php SourcePluginBase::getCache()
8.4.x SourcePluginBase.php SourcePluginBase::getCache()
8.6.x SourcePluginBase.php SourcePluginBase::getCache()

Gets the cache object.

Return value

\Drupal\Core\Cache\CacheBackendInterface The cache object.

File

core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php, line 485

Class

SourcePluginBase
The base class for source plugins.

Namespace

Drupal\migrate\Plugin\migrate\source

Code

protected function getCache() {
  if (!isset($this->cache)) {
    $this->cache = \Drupal::cache('migrate');
  }
  return $this->cache;
}