Use this API to flush cacheobject resources.
333524
public static base_responses flush(nitro_service client, cacheobject resources[]) throws Exception {
		base_responses result = null;
		if (resources != null && resources.length > 0) {
			cacheobject flushresources[] = new cacheobject[resources.length];
			for (int i=0;i<resources.length;i++){
				flushresources[i] = new cacheobject();
				flushresources[i].locator = resources[i].locator;
				flushresources[i].url = resources[i].url;
				flushresources[i].host = resources[i].host;
				flushresources[i].port = resources[i].port;
				flushresources[i].groupname = resources[i].groupname;
				flushresources[i].httpmethod = resources[i].httpmethod;
				flushresources[i].force = resources[i].force;
			}
			result = perform_operation_bulk_request(client, flushresources,"flush");
		}
		return result;
	}
325980
public function flush()
    {
        // this may take a while, but they shouldn't be flushing in production
        $cache_keys = $this->redis->keys(/* prefixed with cache: */ '*');

        foreach ($cache_keys as $key) {
            $this->redis->del($key);
        }

        unset($cache_keys);

        return true;
    }
1114091
public function flush()
    {
        $this->initializeOnDemand();

        if ($this->cacheMapper->flush()) {
            // Reset the current state as well
            $this->cache = array();
            return true;
        } else {
            return false;
        }
    }
440553
public void flush()
        throws IOException
    {
        try
        {
            if (!_commited)
            {
                _commited=true;
                if (_commitObserver!=null)
                    _commitObserver.outputNotify(this,OutputObserver.__COMMITING,null);
            }
            
            wrapBuffer();
            
            // Add headers
            if (_httpMessageWriter.size()>0)
            {
                prewrite(_httpMessageWriter.getBuf(),0,_httpMessageWriter.size());
                _httpMessageWriter.resetWriter();
            }
            
            if (size()>0)
                writeTo(_out);
        }
        catch (IOException e)
        {
            throw new EOFException(e);
        }
        finally
        {
            reset(_preReserve);
        }
    }
224260
public function flushCache()
    {
        $ids = $this->getMemberIDList();
        foreach ($this->getServices() as $service) {
            $service->flushMemberCache($ids);
        }
    }
467484
def _flush(self):
        """"""
        if self.file.closed:
            return
        cache = b"".join(self.cache)
        if not cache:
            # Nothing to write
            return
        uncompressed_data = cache[:self.MAX_CACHE_SIZE]
        # Save data that comes after max size to next round
        tail = cache[self.MAX_CACHE_SIZE:]
        self.cache = [tail]
        self.cache_size = len(tail)
        compressed_data = zlib.compress(uncompressed_data,
                                        self.COMPRESSION_LEVEL)
        obj_size = (OBJ_HEADER_V1_STRUCT.size + LOG_CONTAINER_STRUCT.size +
                    len(compressed_data))
        base_header = OBJ_HEADER_BASE_STRUCT.pack(
            b"LOBJ", OBJ_HEADER_BASE_STRUCT.size, 1, obj_size, LOG_CONTAINER)
        container_header = LOG_CONTAINER_STRUCT.pack(
            ZLIB_DEFLATE, len(uncompressed_data))
        self.file.write(base_header)
        self.file.write(container_header)
        self.file.write(compressed_data)
        # Write padding bytes
        self.file.write(b"\x00" * (obj_size % 4))
        self.uncompressed_size += OBJ_HEADER_V1_STRUCT.size + LOG_CONTAINER_STRUCT.size
        self.uncompressed_size += len(uncompressed_data)
941159
@Override
  public void flush() throws IOException
  {
    if (_os == null || ! _needsFlush)
      return;

    _needsFlush = false;
    try {
      _os.flush();
    } catch (IOException e) {
      try {
        close();
      } catch (IOException e1) {
      }
      
      throw ClientDisconnectException.create(e);
    }
  }
627375
private void flush() {

        if (pendingAbsoluteValueBug != null) {
            absoluteValueAccumulator.accumulateBug(pendingAbsoluteValueBug, pendingAbsoluteValueBugSourceLine);
            pendingAbsoluteValueBug = null;
            pendingAbsoluteValueBugSourceLine = null;
        }
        accumulator.reportAccumulatedBugs();
        if (sawLoadOfMinValue) {
            absoluteValueAccumulator.clearBugs();
        } else {
            absoluteValueAccumulator.reportAccumulatedBugs();
        }
        if (gcInvocationBugReport != null && !sawCurrentTimeMillis) {
            // Make sure the GC invocation is not in an exception handler
            // for OutOfMemoryError.
            boolean outOfMemoryHandler = false;
            for (CodeException handler : exceptionTable) {
                if (gcInvocationPC < handler.getHandlerPC() || gcInvocationPC > handler.getHandlerPC() + OOM_CATCH_LEN) {
                    continue;
                }
                int catchTypeIndex = handler.getCatchType();
                if (catchTypeIndex > 0) {
                    ConstantPool cp = getThisClass().getConstantPool();
                    Constant constant = cp.getConstant(catchTypeIndex);
                    if (constant instanceof ConstantClass) {
                        String exClassName = (String) ((ConstantClass) constant).getConstantValue(cp);
                        if ("java/lang/OutOfMemoryError".equals(exClassName)) {
                            outOfMemoryHandler = true;
                            break;
                        }
                    }
                }
            }

            if (!outOfMemoryHandler) {
                bugReporter.reportBug(gcInvocationBugReport);
            }
        }

        sawCurrentTimeMillis = false;
        gcInvocationBugReport = null;

        exceptionTable = null;
    }
428974
public function flushArrays()
    {
        $this->_filesArray = null;
        $this->_imagesArray = null;
        $this->_foldersArray = null;
        $this->_filtersArray = null;
        $this->deleteHasCache(self::CACHE_KEY_FILE);
        $this->deleteHasCache(self::CACHE_KEY_IMAGE);
        $this->deleteHasCache(self::CACHE_KEY_FOLDER);
        $this->deleteHasCache(self::CACHE_KEY_FILTER);
    }
1333599
protected void flushObject (DObject obj)
    {
        // move this object into the dead pool so that we don't claim to have it around anymore;
        // once our unsubscribe message is processed, it'll be 86ed
        int ooid = obj.getOid();
        _ocache.remove(ooid);
        _dead.put(ooid, obj);

        // ship off an unsubscribe message to the server; we'll remove the object from our table
        // when we get the unsub ack
        _comm.postMessage(new UnsubscribeRequest(ooid));
    }
699493
def _flush(self):
        
        self.classes_names = None
        self.__cache_methods = None
        self.__cached_methods_idx = None
        self.__cache_fields = None

        # cache methods and fields as well, otherwise the decompiler is quite slow
        self.__cache_all_methods = None
        self.__cache_all_fields = None
861627
def flush_cache(self, properties=None):
        
        if hasattr(self, '_cache'):
            if properties is None:
                del(self._cache)
            else:
                for prop in properties:
                    if prop in self._cache:
                        del(self._cache[prop])
828038
public void flush() {
    for (Batch batch : batches.values()) {
      Collection<Batch> subbatches = batch.split();
      for (Batch miniBatch : subbatches) {
        threadPool.submit(miniBatch);
      }
    }
    batches.clear();
  }
264432
def flush(self):
        """"""
        while not self._queue.empty():
            self._queue.get()
            self._queue.task_done()
        self.close()
57574
def _flush(self, buffer):
        
        container, obj = self._client_args
        with _handle_client_exception():
            self._client.put_object(container, obj, buffer)
688774
def flush(self):
        
        annotation = self.get_annotation()
        if annotation.get(ATTACHMENTS_STORAGE) is not None:
            del annotation[ATTACHMENTS_STORAGE]
263107
protected void flushCache() throws IOException {
        if (cachePosition > 0) {
            byte[] chunkHeader = (Integer.toHexString(cachePosition) + "\r\n").getBytes(StandardCharsets.US_ASCII);
            stream.write(chunkHeader, 0, chunkHeader.length);
            stream.write(cache, 0, cachePosition);
            stream.write(ENDCHUNK, 0, ENDCHUNK.length);
            cachePosition = 0;
        }
    }