You are here

PermanentRedisBackend.php in Permanent Cache Bin 8

Same filename and directory in other branches
  1. 8.2 modules/pcb_redis/src/Cache/PermanentRedisBackend.php

File

modules/pcb_redis/src/Cache/PermanentRedisBackend.php
View source
<?php

namespace Drupal\pcb_redis\Cache;

use Drupal\redis\Cache\PhpRedis;

/**
 * Defines a permanent Redis cache implementation.
 *
 * @ingroup cache
 */
class PermanentRedisBackend extends PhpRedis {

  /**
   * {@inheritdoc}
   */
  public function deleteAll() {

    // This cache doesn't need to be deleted when doing cache rebuild.
    // We do nothing here.
  }

  /**
   * Deletes all cache items in a bin when explicitly called.
   *
   * @see \Drupal\Core\Cache\DatabaseBackend::deleteAll()
   */
  public function deleteAllPermanent() {
    parent::deleteAll();
  }

}

Classes

Namesort descending Description
PermanentRedisBackend Defines a permanent Redis cache implementation.