Delete a task from the cache backend
14109
def delete_cached(task_id, broker=None):
    
    if not broker:
        broker = get_broker()
    return broker.cache.delete('{}:{}'.format(broker.list_key, task_id))
574087
def QueueDeleteTasks(self, queue, tasks):
    """"""
    predicates = []
    for task in tasks:
      task_id = getattr(task, "task_id", None) or int(task)
      predicates.append(DataStore.QueueTaskIdToColumn(task_id))
    self.DeleteAttributes(queue, predicates)
313410
def _clear_current_task(self):

        
        self.current.task_name = None
        self.current.task_type = None
        self.current.task = None
1268455
def delete(self, key):
        
        if key in self.cache:
            self.cache.pop(key, None)
1147388
public function deleteAllCache()
    {
        $a = array("dev", "prod");
        for ($i = 0; $i < count($a); $i++) {
            $this->callDelCreaServer($a[$i]);
        }
    }
797132
def clear_cache_for(*paths)
      return unless Lacquer.configuration.enable_cache
      case Lacquer.configuration.job_backend
      when :delayed_job
        require 'lacquer/delayed_job_job'
        Delayed::Job.enqueue(Lacquer::DelayedJobJob.new(paths))
      when :resque
        require 'lacquer/resque_job'
        Resque.enqueue(Lacquer::ResqueJob, paths)
      when :sidekiq
        require 'lacquer/sidekiq_worker'
        Lacquer::SidekiqWorker.perform_async(paths)
      when :none
        Varnish.new.purge(*paths)
      end
    end
1165931
function deleteTask() {
        console.log("Deleting task...");

        const listItem = this.parentNode;
        const ul = listItem.parentNode;

        const task = listItem.getElementsByTagName('label')[0].innerText;

        // *****
        // *** delete a task from the cluster when we press `Delete` button on the completed task
        // *****

        deleteFromFluence(task);

        ul.removeChild(listItem);
    }
1289070
def delete(self):
        
        result = gen.Task(self._redis_client.delete, self._key)
        raise gen.Return(bool(result))
681897
def delete_tasks(config, task_id):
    """"""
    if task_id is None:
        msg = ("Are you sure you want to delete all the tasks and associated task runs?")
        if click.confirm(msg):
            res = _delete_tasks(config, task_id)
            click.echo(res)

        else:
            click.echo("Aborting.")
    else:
        res = _delete_tasks(config, task_id)
        click.echo(res)
402662
def RemoveProcessedTaskStorage(self, task):
    
    if task.identifier not in self._task_storage_writers:
      raise IOError('Storage writer for task: {0:s} does not exist.'.format(
          task.identifier))

    del self._task_storage_writers[task.identifier]
146176
def RemoveTask(self, task):
    
    with self._lock:
      if task.identifier not in self._tasks_abandoned:
        raise KeyError('Task {0:s} was not abandoned.'.format(task.identifier))

      if not task.has_retry:
        raise KeyError(
            'Will not remove a task {0:s} without retry task.'.format(
                task.identifier))

      del self._tasks_abandoned[task.identifier]

      logger.debug('Removed task {0:s}.'.format(task.identifier))
486312
function remove($key=null, $prefix_mode=false)
    {
        // Remove all keys
        if ($key === null) {
            $this->cache         = array();
            $this->cache_changes = array();
            $this->cache_sums    = array();
        }
        // Remove keys by name prefix
        else if ($prefix_mode) {
            foreach (array_keys($this->cache) as $k) {
                if (strpos($k, $key) === 0) {
                    $this->cache[$k] = null;
                    $this->cache_changes[$k] = false;
                    unset($this->cache_sums[$k]);
                }
            }
        }
        // Remove one key by name
        else {
            $this->cache[$key] = null;
            $this->cache_changes[$key] = false;
            unset($this->cache_sums[$key]);
        }

        // Remove record(s) from the backend
        $this->remove_record($key, $prefix_mode);
    }
313686
public Task<Void> remove(final CacheKey key) {
    Preconditions.checkNotNull(key);
    mStagingArea.remove(key);
    try {
      return Task.call(
          new Callable<Void>() {
            @Override
            public Void call() throws Exception {
              try {
                if (FrescoSystrace.isTracing()) {
                  FrescoSystrace.beginSection("BufferedDiskCache#remove");
                }
                mStagingArea.remove(key);
                mFileCache.remove(key);
              } finally {
                if (FrescoSystrace.isTracing()) {
                  FrescoSystrace.endSection();
                }
              }
              return null;
            }
          },
          mWriteExecutor);
    } catch (Exception exception) {
      // Log failure
      // TODO: 3697790
      FLog.w(TAG, exception, "Failed to schedule disk-cache remove for %s", key.getUriString());
      return Task.forError(exception);
    }
  }
571106
def __delete(self, key):
        ''' 
        '''
        with self.get_conn() as conn:
            try:
                c = conn.cursor()
                c.execute("DELETE FROM cache_entries WHERE key = ?", (key,))
                conn.commit()
            except:
                getLogger().exception("Cannot delete")
                return None
5202
def delete_item(key):
    """"""
    CACHED_KEY_FILE = os.path.join(CURRENT_DIR, key)

    if os.path.isfile(CACHED_KEY_FILE):
        os.remove(CACHED_KEY_FILE)
1187306
def delete(self, *args, **kwargs):
        """"""
        cache_key = self.make_key(args, kwargs)
        with self._cache_lock:
            try:
                del self._cache[cache_key]
            except KeyError:
                pass
399334
private static void deleteCache(Configuration conf,
      MRAsyncDiskService asyncDiskService) throws IOException {
    List<CacheStatus> deleteSet = new LinkedList<CacheStatus>();
    // try deleting cache Status with refcount of zero
    synchronized (cachedArchives) {
      for (Iterator<String> it = cachedArchives.keySet().iterator();
           it.hasNext();) {
        String cacheId = (String) it.next();
        CacheStatus lcacheStatus = cachedArchives.get(cacheId);
        if (lcacheStatus.refcount == 0) {
          // delete this cache entry from the global list
          // and mark the localized file for deletion
          deleteSet.add(lcacheStatus);
          it.remove();
        }
      }
    }
    // do the deletion asynchronously, after releasing the global lock
    Thread cacheFileCleaner = new Thread(
        new CacheFileCleanTask(asyncDiskService,
                               FileSystem.getLocal(conf),
                               deleteSet));
    cacheFileCleaner.start();
  }