Clears all entries in the cache, online or offline.<p>

The keys are not cleared.<p>

Only users with administrator permissions are allowed
to perform this operation.<p>
518415
private synchronized void clearEntries() {

        if (!isEnabled()) {
            return;
        }
        if (LOG.isInfoEnabled()) {
            LOG.info(Messages.get().getBundle().key(Messages.LOG_FLEXCACHE_CLEAR_ALL_0));
        }
        // create new set to avoid ConcurrentModificationExceptions
        Set<String> cacheKeys = synchronizedCopyKeys(m_keyCache);
        Iterator<String> i = cacheKeys.iterator();
        while (i.hasNext()) {
            CmsFlexCacheVariation v = m_keyCache.get(i.next());
            Iterator<I_CmsLruCacheObject> allEntries = v.m_map.values().iterator();
            while (allEntries.hasNext()) {
                I_CmsLruCacheObject nextObject = allEntries.next();
                allEntries.remove();
                m_variationCache.remove(nextObject);
            }
            v.m_map = new Hashtable<String, I_CmsLruCacheObject>(INITIAL_CAPACITY_VARIATIONS);
        }
        m_size = 0;
    }
1318752
public synchronized void clear() {
		try {
			super.clear();
			list.clear();
		} catch (Exception e) {
			log.log(Level.SEVERE, "clear cache: ", e);
		}
	}
1347428
private void clearOffline() {

        if (!isEnabled()) {
            return;
        }
        if (LOG.isInfoEnabled()) {
            LOG.info(Messages.get().getBundle().key(Messages.LOG_FLEXCACHE_CLEAR_KEYS_AND_ENTRIES_0));
        }
        clearAccordingToSuffix(CACHE_OFFLINESUFFIX, false);
    }
913105
public void clear() {
        final ReentrantLock lock = this.lock;
        lock.lock();
        try {
            q.clear();
        } finally {
            lock.unlock();
        }
    }
845240
public void clear() {
        // clear out ref queue. We don't need to expunge entries
        // since table is getting cleared.
        while (queue.poll() != null)
            ;

        modCount++;
        Arrays.fill(table, null);
        size = 0;

        // Allocation of array may have caused GC, which may have caused
        // additional entries to go stale.  Removing these entries from the
        // reference queue will make them eligible for reclamation.
        while (queue.poll() != null)
            ;
    }
763715
public void clear()
  {
    if (_size1 == 0 && _size2 == 0)
      return;

    ArrayList<CacheListener> listeners = null;

    for (int i = _entries.length - 1; i >= 0; i--) {
      Object lock = getLock(i);

      synchronized (lock) {
        CacheItem<K,V> item = _entries[i];
        _entries[i] = null;

        if (_isEnableListeners) {
          for (; item != null; item = item._nextHash) {
            removeLruItem(item);

            if (item._value instanceof CacheListener) {
              if (listeners == null)
                listeners = new ArrayList<CacheListener>();
              listeners.add((CacheListener) item._value);
            }
          }
        }
      }
    }

    for (int i = listeners != null ? listeners.size() - 1 : -1;
         i >= 0;
         i--) {
      CacheListener listener = listeners.get(i);
      listener.removeEvent();
    }
  }
717482
public void clear()
    {
        // clear out ref queue. We don't need to expunge entries
        // since table is getting cleared.
        emptySoftQueue();

        Entry tab[] = table;
        for (int i = 0; i < tab.length; ++i)
            tab[i] = null;
        size = 0;

        // Allocation of array may have caused GC, which may have caused
        // additional entries to go stale.  Removing these entries from the
        // reference queue will make them eligible for reclamation.
        emptySoftQueue();
    }
1233500
public function clear()
    {
        $this->assertOpened();
        foreach ($this->contents as $key => $value) {
            unset($this->contents[$key]);
        }
    }
744484
public synchronized void clear()
    {
        for (String keyspaceName : getNonSystemKeyspaces())
        {
            KSMetaData ksm = getKSMetaData(keyspaceName);
            for (CFMetaData cfm : ksm.cfMetaData().values())
                purge(cfm);
            clearKeyspaceDefinition(ksm);
        }

        updateVersionAndAnnounce();
    }
806687
def clear(self):
        
        self._lock.acquire()
        try:
            self._cache = []
            self._updated = False
        finally:
            self._lock.release()
609579
public void clearCache()
  {
    ZipFile zipFile = _zipFileRef.getAndSet(null);

    if (zipFile != null)
      try {
        zipFile.close();
      } catch (Exception e) {
      }
  }
63470
@Override
  @SuppressWarnings("unchecked")
  public void clear() {
    // iterate over all keys in originalMap and set them to null in deltaMap
    for (K key : originalMap.keySet()) {
      deltaMap.put(key, (V)removedValue);
    }
  }
523579
public void clearCache() {
        File cacheDir = getCacheDir();
        if (cacheDir.exists()) {
            File[] files = cacheDir.listFiles();
            if (files != null) {
                for (File child : files) {
                    deleteFilesRecursively(child);
                }
            }
        }
    }
1347580
public static void clear() {
        int size;
        long stamp = lock.readLock();
        try {
            size = cache.size();
            if (size == 0) {
                return;
            }

            stamp = convertToWriteLock(stamp);
            size = cache.size();
            cache.clear();
        } finally {
            lock.unlock(stamp);
        }

        if (size != 0 && logger.isDebugEnabled()) {
            if (size != 1) {
                logger.debug("Cleared: {} entries", size);
            } else {
                logger.debug("Cleared: 1 entry");
            }
        }
    }
248957
public void clear() {
    FastHashtableEntry tab[] = table;
    for (int index = tab.length; --index >= 0; )
      tab[index] = null;
    count = 0;
  }
767206
protected void clearCaches(CmsEvent event) {

        // synchronization of this method is not required as the individual maps are all synchronized maps anyway,
        // and setExportnames() is doing it's own synchronization

        // flush all caches
        m_cacheOnlineLinks.clear();
        m_cacheExportUris.clear();
        m_cacheSecureLinks.clear();
        m_cacheExportLinks.clear();
        m_exportnameResources = null;
        if (LOG.isDebugEnabled()) {
            LOG.debug(Messages.get().getBundle().key(Messages.LOG_FLUSHED_CACHES_1, new Integer(event.getType())));
        }
    }
1190280
protected void offlineCacheClear() {

        for (CachePair cachePair : m_caches) {
            try {
                cachePair.getOfflineCache().clear();
            } catch (Throwable t) {
                LOG.error(t.getLocalizedMessage(), t);
            }
        }
    }