Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x

None.php

Same filename in this branch
  1. 11.1.x core/modules/views/src/Plugin/views/pager/None.php
  2. 11.1.x core/modules/views/src/Plugin/views/argument_validator/None.php
  3. 11.1.x core/modules/views/src/Plugin/views/access/None.php

Namespace

Drupal\views\Plugin\views\cache

File

core/modules/views/src/Plugin/views/cache/None.php

View source
<?php

namespace Drupal\views\Plugin\views\cache;

use Drupal\Core\StringTranslation\TranslatableMarkup;
use Drupal\views\Attribute\ViewsCache;

/**
 * Caching plugin that provides no caching at all.
 *
 * @ingroup views_cache_plugins
 */
class None extends CachePluginBase {
    public function summaryTitle() {
        return $this->t('None');
    }
    
    /**
     * Overrides \Drupal\views\Plugin\views\cache\CachePluginBase::cacheGet().
     *
     * Replace the cache get logic so it does not return a cache item at all.
     */
    public function cacheGet($type) {
        return FALSE;
    }
    
    /**
     * {@inheritdoc}
     *
     * Replace the cache set logic so it does not set a cache item at all.
     */
    public function cacheSet($type) {
    }

}

Classes

Title Deprecated Summary
None Caching plugin that provides no caching at all.

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal