code: 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();
      }
    }
docs: Clears the cache