Remove the given job IDs from the given tag.

@param  array|string  $tags
@param  array|string  $ids
@return void
431382
public function forgetJobs($tags, $ids)
    {
        $this->connection()->pipeline(function ($pipe) use ($tags, $ids) {
            foreach ((array) $tags as $tag) {
                foreach ((array) $ids as $id) {
                    $pipe->zrem($tag, $id);
                }
            }
        });
    }
1003634
public function detachTags($tags)
    {
        $tags = static::convertToTags($tags);

        collect($tags)
            ->filter()
            ->each(function (Tag $tag) {
                $this->tags()->detach($tag);
            });

        return $this;
    }
1191801
public function deleteByTags($tag)
    {
        if (!isset($this->tags[$tag])) {
            return false;
        }

        foreach ($this->tags[$tag] as $key) {
            $this->delete($key);
        }

        return true;
    }
881859
public function deleteMatchingNoneOfTags(array $tags)
    {
        $this->collection->batchDelete(function (\Sokil\Mongo\Expression $e) use ($tags) {
            return $e->whereNoneOf(Cache::FIELD_NAME_TAGS, $tags);
        });
        
        return $this;
    }
918793
public function removeMany(array $ids) {
		$result = true;
		
		foreach ($ids as $id) {
			if (! apc_delete($id)) {
				$result = false;
			}
		}
		
		return $result;
	}
774567
public function deleteEntryByTags(array $tags)
    {
        if (count($tags) < 1) {
            throw new HrcException('You need to provide at least one tag.');
        }

        $tagFolder = str_replace($this->indexDir, '',
            rtrim($this->createFolderNameFromTags($tags), DIRECTORY_SEPARATOR));

        // remove index
        array_map('unlink', (glob($this->indexDir . '*' . $tagFolder . '*/*/*/*/index.db') ?: []));

        // remove inner folders
        $levelsToRemove = [
            $this->indexDir . '*' . $tagFolder . '*/*/*/*',
            $this->indexDir . '*' . $tagFolder . '*/*/*',
            $this->indexDir . '*' . $tagFolder . '*/*',
            $this->indexDir . '*' . $tagFolder . '*',
        ];

        // remove indexes
        foreach ($levelsToRemove as $lr) {
            array_map('rmdir', (glob($lr) ?: []));
        }
    }
934674
public function clearTag(string $tag): void
    {
        // 指定标签清除
        $keys = $this->getTagItems($tag);

        $this->handler->deleteMulti($keys);

        $tagName = $this->getTagKey($tag);
        $this->rm($tagName);
    }
101019
public function tag($tags)
    {
        $tags = $this->makeTagsArray($tags);

        $this->addTags($tags);

        if (count($tags) > 0) {
            $this->tags()->sync(
                Tag::whereIn('tag', $tags)->pluck('id')->all()
            );

            return;
        }

        $this->tags()->detach();
    }
929431
def clear(self, tag=None):
        
        if tag is None:
            del self.jobs[:]
        else:
            self.jobs[:] = (job for job in self.jobs if tag not in job.tags)
54333
public function deleteMatchingAnyTag(array $tags)
    {
        $this->collection->batchDelete(function (\Sokil\Mongo\Expression $e) use ($tags) {
            return $e->whereIn(Cache::FIELD_NAME_TAGS, $tags);
        });
        
        return $this;
    }
594479
public function deleteItems( array $ids )
	{
		if( empty( $ids ) ) { return; }

		foreach( $this->_getSubManagers() as $submanager ) {
			$submanager->deleteItems( $ids );
		}
	}
409409
private function removeByChunk(array $ids) {
    $storage = $this->entityTypeManager->getStorage('openy_pef_gxp_mapping');
    $chunks = array_chunk($ids, self::CHUNK_DELETE);

    foreach ($chunks as $chunk) {
      $entities = $storage->loadMultiple($chunk);
      $storage->delete($entities);
      $this->loggerChannel->debug(
        'Chunk of %chunk openy_pef_gxp_mapping entities has been deleted.',
        ['%chunk' => count($chunk)]
      );
    }
  }
520732
def job_remove_tags(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/removeTags' % object_id, input_params, always_retry=always_retry, **kwargs)
1157832
public function cleanupNodesWithIds($ids)
    {
        $ids = array_merge($this->getRelatedNodeIds($ids), $ids);

        if (!empty($ids)) {
            $repositories = $this->getNodeRepositories($ids);

            //delete all the nodes
            $this->getService('repos:base.node')->destroy($ids);

            //set the creator,updator,authors to null
            $in = '('.implode(',', $ids).')';
            $query[] = "last_comment_id = IF(last_comment_id IN $in, NULL, last_comment_id)";
            $query[] = "created_by = IF(created_by IN $in, NULL, created_by)";
            $query[] = "modified_by = IF(modified_by IN $in, NULL, modified_by)";
            $query[] = "last_comment_by = IF(last_comment_by IN $in, NULL, last_comment_by)";
            $query = implode(', ', $query);
            $where = $this->getService('repos:base.node')
                        ->getQuery()
                        ->where("last_comment_by IN $in OR created_by IN $in OR modified_by IN $in OR last_comment_by IN $in");

            $this->getService('repos:base.node')->update($query, $where);

            //cleanup all the relationship of every deleted node
            $query = $this->getService('repos:base.edge')
                ->getQuery()
                ->where('nodeA.id', 'IN', $ids)
                ->where('nodeB.id', 'IN', $ids, 'OR');

            $this->getService('repos:base.edge')->destroy($query);

            //now lets the repositories know so they can
            //handle the cleanup
            foreach ($repositories as $repository) {
                $context = $repository->getCommandContext();
                $context->node_ids = $ids;
                $repository->getCommandChain()->run('after.deletenodes', $context);
            }
        }
    }
1300218
public function removeByTag($tags, $byIntersect = false) {
		if (is_array($tags)) {
			$tags = array_map([$this, 'prepareTag'], array_values($tags));
		} else {
			$tags = $this->prepareTag($tags);
		}
		
		$tagData = $this->getTagData($tags, $byIntersect);
		
		if ($tagData === null) {
			return true;
		}
		
		$result = $this->getBackend()->removeMany($tagData);
		
		if ($result === true && $byIntersect === false) {
			if (is_array($tags)) {
				$this->getTagHolderBackend()->removeMany($tags);
			} else {
				$this->getTagHolderBackend()->remove($tags);
			}
		}
		
		return $result;
	}
999279
public function setTagsAttribute($tags): void
    {
        static::saved(function (self $model) use ($tags) {
            $model->syncTags($tags);
        });
    }
721730
public static function invalidateTags(array $tags)
    {
        $cache = self::getCacheService()->user();
        if ($cache instanceof TagAwareAdapterInterface) {
            $cache->invalidateTags($tags);
        }
    }