Smazani cache
@throws AbortException
7432
public function handleInvalidateCache(): void
	{
		$this->checkHandlerPermission();

		$this->app->invalidateCache();
		$this->flashNotifier->success('dockbar.management.application.cacheInvalidated');
	}
871634
protected synchronized void flush() throws RepositoryException, MalformedQueryException, UpdateExecutionException, IOException {
        if (cache.isEmpty()) { return; }
        StringBuffer entireQuery = new StringBuffer();
        SPARQLQueryBindingSet bindingSet = new SPARQLQueryBindingSet();

        for (Namespace ns :cache.getNamespaces()){
            entireQuery.append("PREFIX "+ns.getPrefix()+": <"+ns.getName()+">. ");
        }
        entireQuery.append("DELETE DATA { ");

        Set<Resource> distinctCtx = new HashSet<Resource>();
        for (Resource context :cache.contexts()) {
            distinctCtx.add(context);
        }

        for (Resource ctx : distinctCtx) {
               if (ctx != null) {
                   entireQuery.append(" GRAPH <" + ctx + "> { ");
               }
                for (Statement stmt : cache.filter(null, null, null, ctx)) {
                    entireQuery.append("<" + stmt.getSubject().stringValue() + "> ");
                    entireQuery.append("<" + stmt.getPredicate().stringValue() + "> ");
                    Value object=stmt.getObject();
                    if (object instanceof Literal) {
                        Literal lit = (Literal) object;
                        entireQuery.append("\"");
                        entireQuery.append(SPARQLUtil.encodeString(lit.getLabel()));
                        entireQuery.append("\"");
                        if(null == lit.getLanguage()) {
                            entireQuery.append("^^<" + lit.getDatatype().stringValue() + ">");
                        }else{
                            entireQuery.append("@" + lit.getLanguage().toString());
                        }
                    } else {
                        entireQuery.append("<" + object.stringValue() + "> ");
                    }
                    entireQuery.append(".");
                }
                if (ctx != null) {
                    entireQuery.append(" }");
                }
        }

        entireQuery.append("} ");
        log.info(entireQuery.toString());
        client.sendUpdateQuery(entireQuery.toString(),bindingSet,false,null);
        lastCacheAccess = new Date();
        //log.info("success writing cache: {}",String.valueOf(cache.size()));
        cache.clear();

    }
1358632
public function execute(): void
    {
        $path = '';
        
        try {
            $path = $this->getPath();
            
            if ($this->config->cache) {
                try {
                    $this->setCache();
                } catch (StorageNotSupportedException $e) {
                    $this->cache = null;
                } catch (StorageConnectException $e) {
                    $this->cache = null;
                }
            }
            
            if (null !== $this->cache 
            && !$this->cache->expired($path, $this->config->cacheTtlWholePage)) {
                $result = $this->getCacheResult($this->cache->get($path, ''));
            } else {
                $result = $this->compose($this->parse($path));
            }
            
        } catch (BadPathException $e) {
            $result = $this->getError(500, 'Bad path');
            
        } catch (RouteStorageNotSetException $e) {
            $result = $this->getError(500, 'Route storage not set');
            
        } catch (RouteStorageEmptyException $e) {
            $result = $this->getError(500, 'Route storage empty');
            
        } catch (DbConnectException $e) {
            if (null !== $this->cache && $this->cache->has($path)) {
                // @codeCoverageIgnoreStart
                // passed in local tests, but skipped in travis
                $result = $this->getCacheResult($this->cache->get($path, ''));
                // @codeCoverageIgnoreEnd
            } else {
                $result = $this->getError(500, 'DataBase connection error');
            }
            
        } catch (SectionNotExistsException $e) {
            $result = $this->getError(404, 'Section not exists');
            
        } catch (SectionDisabledException $e) {
            $result = $this->getError(403, 'Section disabled');
            
        } catch (ModuleDisabledException $e) {
            $result = $this->getError(403, 'Section module disabled');
            
        } catch (ModuleParameterConflictException $e) {
            $result = $this->getError(404, 'Module parameter conflict with another');
            
        } catch (ModuleParameterFormatException $e) {
            $result = $this->getError(404, 'Module parameter bad format');
            
        } catch (ModuleParameterUnknownException $e) {
            $result = $this->getError(404, 'Module parameter unknown');
            
        } catch (\Throwable $e) {
            $result = $this->getError(500, 'Unexpected exception: ' . $e->getMessage());
            
        }
        
        $this->sendHeaders($result->getHeaders());
        
        $this->render($result->getView());
    }
534691
public function handleDeleteImages(string $json): void
	{
		if ($this->request->isAjax()) {
			$data = Json::decode($json);

			$result = $this->getStorage()->delete($data);
			foreach ($result as $row) {
				$this->imageStorage->delete($row);
			}

			$this->redrawControl('gallery');
		} else {
			throw new AbortException;
		}
	}
930407
public void sync() throws MarkLogicSesameException {
		if(WRITE_CACHE_ENABLED && timerWriteCache != null)
			timerWriteCache.forceRun();
		if(DELETE_CACHE_ENABLED && timerDeleteCache != null)
			timerDeleteCache.forceRun();
	}
54926
public void abort()
    {
        assert descriptor.type.isTemporary;
        if (iwriter == null && dataFile == null)
            return;

        if (iwriter != null)
            iwriter.abort();

        if (dataFile!= null)
            dataFile.abort();

        Set<Component> components = SSTable.componentsFor(descriptor);
        try
        {
            if (!components.isEmpty())
                SSTable.delete(descriptor, components);
        }
        catch (FSWriteError e)
        {
            logger.error(String.format("Failed deleting temp components for %s", descriptor), e);
            throw e;
        }
    }
1007771
protected void onlineCacheClear() {

        for (CachePair cachePair : m_caches) {
            try {
                cachePair.getOnlineCache().clear();
            } catch (Throwable e) {
                LOG.error(e.getLocalizedMessage(), e);
            }
        }
    }
1164709
public function handleDeleteAllImages(): void
	{
		if ($this->request->isAjax()) {
			$result = $this->getStorage()->delete();
			foreach ($result as $row) {
				$this->imageStorage->delete($row);
			}

			$this->redrawControl('gallery');
		} else {
			throw new AbortException;
		}
	}
1219187
private <T> T loadDataFromCache(final Class<T> clazz, final Object cacheKey, final long maxTimeInCacheBeforeExpiry) throws CacheLoadingException, CacheCreationException {
        return cacheManager.loadDataFromCache(clazz, cacheKey, maxTimeInCacheBeforeExpiry);
    }
406600
public void abort(Executor executor) throws SQLException {
    if (this.isClosed()) {
      return;
    }

    SQLPermission sqlPermission = new SQLPermission("callAbort");
    SecurityManager securityManager = System.getSecurityManager();
    if (securityManager != null) {
      securityManager.checkPermission(sqlPermission);
    }
    if (executor == null) {
      throw ExceptionMapper.getSqlException("Cannot abort the connection: null executor passed");
    }

    executor.execute(protocol::abort);
  }
118602
void abort(Throwable t) throws IOException {
    LOG.info("Aborting because of " + StringUtils.stringifyException(t));
    try {
      downlink.abort();
      downlink.flush();
    } catch (IOException e) {
      // IGNORE cleanup problems
    }
    try {
      handler.waitForFinish();
    } catch (Throwable ignored) {
      process.destroy();
    }
    IOException wrapper = new IOException("pipe child exception");
    wrapper.initCause(t);
    throw wrapper;      
  }
1346746
public void abort() {
        URL abortURL = this.sessionInfo.getSessionEndpoints().getAbortEndpoint();
        BoxJSONRequest request = new BoxJSONRequest(this.getAPI(), abortURL, HttpMethod.DELETE);
        request.send();
    }
905588
@Delete
    public Maybe<Boolean> invalidateCache(@NotBlank @Selector String name) {
        try {
            final SyncCache<Object> cache = cacheManager.getCache(name);
            return Maybe.create(emitter -> cache.async().invalidateAll().whenComplete((aBoolean, throwable) -> {
                if (throwable != null) {
                    emitter.onError(throwable);
                } else {
                    emitter.onSuccess(aBoolean);
                    emitter.onComplete();
                }
            }));
        } catch (ConfigurationException e) {
            // no cache
            return Maybe.empty();
        }
    }
1025214
public void abort() {
    LOG.info("Aborting session driver");
    running = false;
    cmNotifier.clearCalls();
    cmNotifier.doShutdown();
    server.stop();
    incomingCallExecutor.interrupt();
  }
487913
@Override
  public void abortTask(TaskAttemptContext context) throws IOException {
    try {
      if (workPath != null) { 
        context.progress();
        if (!outputFileSystem.delete(workPath, true)) {
          LOG.warn("Deleting output in " + workPath + " returns false");
        }
      }
    } catch (IOException ie) {
      LOG.warn("Error discarding output in " + workPath, ie);
      throw ie;
    }
  }
196819
public function clearCache()
    {
        $result = $this->getContainer()->get('fileManager')->removeInDir($this->cachePath);

        if ($result != true) {
            throw new Exceptions\Error("Error while clearing cache");
        }

        $this->updateCacheTimestamp();

        return $result;
    }
1338460
protected void reloadCache()
        throws InstallationException
    {
        try {
            LOG.info("Reloading Cache");
            Context.begin();
            if (RunLevel.isInitialisable()) {
                RunLevel.init("shell");
                RunLevel.execute();
            }
            Context.commit();
        } catch (final EFapsException e) {
            throw new InstallationException("Reload cache failed", e);
        }
    }