Responsible for flushing the cache and notifying karma.
969724
function processServeQueue() {
      while (serveQueue.length) {
        const item = serveQueue.shift();
        _serveFile(item.file, item.done);
        // It is possible start compiling while in release.
        if (state.compilationCompleted !== _currentState) {
          break;
        }
      }
    }
314453
function putCache(key, contents, callback) {
    key = key.replace(/\//g, '-');
    var cacheFile = __dirname + '/' + CACHE_PREFIX + key + '.cache';

    fs.writeFile(cacheFile, contents, function (err) {
        if (err) {
            console.error('Error adding response to cache at ' + cacheFile);
            throw err;
        } else if (callback) {
            callback();
            return;
        }
    });
}
493547
def Flush(self):
    """"""
    if self._dirty:
      self.Set(self.Schema.SIZE(self.size))
      if self.content_last is not None:
        self.Set(self.Schema.CONTENT_LAST, self.content_last)

    # Flushing the cache will write all chunks to the blob store.
    self.chunk_cache.Flush()
    super(AFF4ImageBase, self).Flush()
1187565
public function flushCache()
    {
        $iterator = new \DirectoryIterator($this->getConfig('cache_folder'));

        foreach ($iterator as $file) {
            if (! $file->isDot()) {
                unlink($file->getPathname());
            }
        }
    }
98918
function onSuccess() {
            /**
             * Make sure to clear the cache for this Entity Kind
             */
            if (_this.constructor.__hasCache(options)) {
                return _this.constructor.clearCache()
                    .then(() => _this)
                    .catch((err) => {
                        let msg = 'Error while clearing the cache after saving the entity.';
                        msg += 'The entity has been saved successfully though. ';
                        msg += 'Both the cache error and the entity saved have been attached.';
                        const cacheError = new Error(msg);
                        cacheError.__entity = _this;
                        cacheError.__cacheError = err;
                        throw cacheError;
                    });
            }

            return _this;
        }
939457
def update_cache(self, data):
        """"""
        UTILS.update(self._cache, data)
        self._save_cache()
1218236
function flushExpired () {
  return storage.keys().then(keys => {
    const cacheKeys = keys.filter(key => key.indexOf(expire) === 0)
    return Promise.all(cacheKeys.map(key => get(key.slice(prefix.length))))
  })
}
834807
def flush(self):
        
        for elem in self:
            if elem.id[0] != scoop.worker:
                elem._delete()
            self.socket.sendFuture(elem)
        self.ready.clear()
        self.movable.clear()
1302387
function cacher(f, scope, postprocessor) {
            function repush(array, item) {
                for (var i = 0, ii = array.length; i < ii; i++) if (array[i] === item) {
                    return array.push(array.splice(i, 1)[0]);
                }
            }
            function newf() {
                var arg = Array.prototype.slice.call(arguments, 0), args = arg.join("␀"), cache = newf.cache = newf.cache || {}, count = newf.count = newf.count || [];
                if (cache.hasOwnProperty(args)) {
                    repush(count, args);
                    return postprocessor ? postprocessor(cache[args]) : cache[args];
                }
                if (count.length >= 1e3) {
                    delete cache[count.shift()];
                }
                count.push(args);
                cache[args] = f.apply(scope, arg);
                return postprocessor ? postprocessor(cache[args]) : cache[args];
            }
            return newf;
        }
213982
def cache_clear(self):
		""""""
		with self.cache_lock:
			cursor = self.cache_db.cursor()
			cursor.execute('DELETE FROM cache')
			self.cache_db.commit()
		self.logger.info('the RPC cache has been purged')
		return
869052
public function flush()
    {
        if (file_exists($this->CacheFolder . "/" . $this->CacheIndex)) {
            unlink($this->CacheFolder . "/" . $this->CacheIndex);
            touch($this->CacheFolder . "/" . $this->CacheIndex);
        }
        if (file_exists($this->CacheFolder . "/" . $this->CacheDB)) {
            unlink($this->CacheFolder . "/" . $this->CacheDB);
            touch($this->CacheFolder . "/" . $this->CacheDB);
        }
    }
1066877
private static void addCacheInfoUpdate(CacheStatus cacheStatus) {
    long cacheSize = cacheStatus.size;
    synchronized (baseDirSize) {
      Long dirSize = baseDirSize.get(cacheStatus.getBaseDir());
      if( dirSize == null ) {
        dirSize = Long.valueOf(cacheSize);
      } else {
        dirSize += cacheSize;
      }
      baseDirSize.put(cacheStatus.getBaseDir(), dirSize);
    }
    synchronized (baseDirNumberSubDir) {
      Integer dirSubDir = baseDirNumberSubDir.get(cacheStatus.getBaseDir());
      if( dirSubDir == null ) {
        dirSubDir = 1;
      } else {
        dirSubDir += 1;
      }
      baseDirNumberSubDir.put(cacheStatus.getBaseDir(), dirSubDir);
    }
  }
767636
function flushCache(stream) {
    lastWrite = Date.now();

    if (timeout) {
      clearTimeout(timeout);
      timeout = null;
    }

    stream.push(cache.splice(0, settings.count || cache.length));
  }
1369522
private static void deleteCacheInfoUpdate(CacheStatus cacheStatus) {
    if (!cacheStatus.isInited()) {
      // if it is not created yet, do nothing.
      return;
    }
    synchronized (baseDirSize) {
      Long dirSize = baseDirSize.get(cacheStatus.getBaseDir());
      if ( dirSize != null ) {
        dirSize -= cacheStatus.size;
        baseDirSize.put(cacheStatus.getBaseDir(), dirSize);
      }
    }
    synchronized (baseDirNumberSubDir) {
      Integer dirSubDir = baseDirNumberSubDir.get(cacheStatus.getBaseDir());
      if ( dirSubDir != null ) {
        dirSubDir--;
        baseDirNumberSubDir.put(cacheStatus.getBaseDir(), dirSubDir);
      }
    }
  }
771853
private void requestCacheUpdate() {
        log.debug("Cache update requested");
        if (updateRequested) {
            log.debug("Cache update, redundant request ignored.");
            return;
        }

        updateRequested = true;

        if (!updating) {
            updateCache();
        }
    }
564873
function flush(req, res) {
  this.spawn();
  this.reply(req, res);
  this.ps.send({event: 'flush'});
}
475427
def flush(bank, key=None, cachedir=None):
    '''
    
    '''
    if cachedir is None:
        cachedir = __cachedir()

    try:
        if key is None:
            target = os.path.join(cachedir, os.path.normpath(bank))
            if not os.path.isdir(target):
                return False
            shutil.rmtree(target)
        else:
            target = os.path.join(cachedir, os.path.normpath(bank), '{0}.p'.format(key))
            if not os.path.isfile(target):
                return False
            os.remove(target)
    except OSError as exc:
        raise SaltCacheError(
            'There was an error removing "{0}": {1}'.format(
                target, exc
            )
        )
    return True