Disables the Redis object cache.

Default behavior is to delete the object cache drop-in,
unless an unknown object cache drop-in is present.

## EXAMPLES

wp redis disable
194083
public function disable() {

        global $wp_filesystem;

        $plugin = $GLOBALS[ 'redisObjectCache' ];

        if ( ! $plugin->object_cache_dropin_exists() ) {

            WP_CLI::error( __( 'No object cache drop-in found.', 'redis-cache' ) );

        } else {

            if ( ! $plugin->validate_object_cache_dropin() ) {

                WP_CLI::error( __( 'An unknown object cache drop-in was found. To use Redis run: wp redis update-dropin.', 'redis-cache' ) );

            } else {

                WP_Filesystem();

                if ( $wp_filesystem->delete( WP_CONTENT_DIR . '/object-cache.php' ) ) {
                    WP_CLI::success( __( 'Object cache disabled.', 'redis-cache' ) );
                } else {
                    WP_CLI::error( __( 'Object cache could not be disabled.', 'redis-cache' ) );
                }

            }

        }

    }
730080
public function disableDownload(){
        $this->headers->remove('Cache-Control');
        $this->headers->remove('Pragma');
        $this->headers->remove('Expires');
    }
1117726
def clear(self, exclude=None):
        
        if exclude is None:
            self.cache = {}
        else:
            self.cache = {k: v for k, v in self.cache.items()
                          if k in exclude}
809099
public function forgetCache()
    {
        foreach (['url', 'js_url'] as $attribute) {
            $key = $attribute.'_'.$this->location;
            Cache::forget($key);
        }
    }
604325
def disable(self, clear_cache=True):
        
        logger.debug('disable(clear_cache={})'.format(clear_cache))
        if clear_cache:
            self.clear()
        self.options.enabled = False
        logger.info('cache disabled')
404942
@Nonnull
  public final UnifiedResponse disableCaching ()
  {
    // Remove any eventually set headers
    removeCaching ();

    if (m_eHttpVersion.is10 ())
    {
      // Set to expire far in the past for HTTP/1.0.
      m_aResponseHeaderMap.setHeader (CHttpHeader.EXPIRES, ResponseHelperSettings.EXPIRES_NEVER_STRING);

      // Set standard HTTP/1.0 no-cache header.
      m_aResponseHeaderMap.setHeader (CHttpHeader.PRAGMA, "no-cache");
    }
    else
    {
      final CacheControlBuilder aCacheControlBuilder = new CacheControlBuilder ().setNoStore (true)
                                                                                 .setNoCache (true)
                                                                                 .setMustRevalidate (true)
                                                                                 .setProxyRevalidate (true);

      // Set IE extended HTTP/1.1 no-cache headers.
      // http://aspnetresources.com/blog/cache_control_extensions
      // Disabled because:
      // http://blogs.msdn.com/b/ieinternals/archive/2009/07/20/using-post_2d00_check-and-pre_2d00_check-cache-directives.aspx
      if (false)
        aCacheControlBuilder.addExtension ("post-check=0").addExtension ("pre-check=0");

      setCacheControl (aCacheControlBuilder);
    }
    return this;
  }
598064
static function clear_cache() {
			self::_init();

			self::$_cache = FS_Cache_Manager::get_manager( WP_FS__API_CACHE_OPTION_NAME );
			self::$_cache->clear();
		}
99594
public function clearCacheAction()
    {
        /* @var $cache FlushableCache */
        $cache = $this->serviceLocator->get('DiCache');

        if ($cache instanceof FlushableCache) {
            $cache->flushAll();
        }

        echo "PHP DI definitions cache was cleared." . PHP_EOL . PHP_EOL;
    }
1299699
static function drop_cached($object)
	{
		// Если объект хранится в memcached ...
		if(($memcache_instance = \B2\Cfg::get('memcached_instance')))
			$memcache_instance->delete(self::memcache_hash_key($object));
	}
315519
private function _deleteCache()
    {
        if ($this->_cache instanceof \Zend_Cache_Core) {
            $this->_cache->remove($this->_cacheid);
            $this->_cache->remove($this->_cacheid . 'trans');
        }
    }
1163374
public function shutdownObject()
    {
        if ($this->tagsToFlush !== []) {
            foreach ($this->tagsToFlush as $tag => $logMessage) {
                $affectedEntries = $this->contentCache->flushByTag($tag);
                if ($affectedEntries > 0) {
                    $this->systemLogger->debug(sprintf('Content cache: Removed %s entries %s', $affectedEntries, $logMessage));
                }
            }
        }
    }
1297819
def delete(self, redis):
        '''  '''
        if self.index:
            redis.hdel(self.key(), getattr(self.obj, self.name))
274024
def delete(self, to_delete):
        
        if not isinstance(to_delete, list):
            to_delete = [to_delete]
        for zenpy_object in to_delete:
            object_type = get_object_type(zenpy_object)
            object_cache = self.mapping.get(object_type, None)
            if object_cache:
                removed_object = object_cache.pop(zenpy_object.id, None)
                if removed_object:
                    log.debug("Cache RM: [%s %s]" % (object_type.capitalize(), zenpy_object.id))
342622
def disablingBuidCache(self):
        '''
        
        '''
        self.buidcache = s_cache.LruDict(0)
        yield
        self.buidcache = s_cache.LruDict(BUID_CACHE_SIZE)
888398
private function clearCache(): void
    {
        try {
            $cacheTag = config('netcore.module-category.cache_tag');
            $isRedis = cache()->getStore() instanceof RedisStore;

            if ($cacheTag && $isRedis) {
                cache()->tags([$cacheTag])->flush();
            } else {
                cache()->flush();
            }
        } catch (Exception $exception) {
            logger()->error('[module-category] Unable to clear cache: ' . $exception->getMessage());
        }
    }
734780
function clearCache() {
  cache_stopById.clear();
  cache_stopByName.clear();
  cache_stopByStatusId.clear();
  cache_stops.clear();
  cache_stopsByRoute.clear();
}
708226
@Override
	public void clearCache(CPOptionCategory cpOptionCategory) {
		entityCache.removeResult(CPOptionCategoryModelImpl.ENTITY_CACHE_ENABLED,
			CPOptionCategoryImpl.class, cpOptionCategory.getPrimaryKey());

		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
		finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);

		clearUniqueFindersCache((CPOptionCategoryModelImpl)cpOptionCategory,
			true);
	}