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