This method helps to add clearing Near Cache event only from one-partition which matches partitionId of the map name.
185220
protected final void invalidateAllKeysInNearCaches() {
        if (mapContainer.hasInvalidationListener()) {

            int partitionId = getPartitionId();
            Invalidator invalidator = getNearCacheInvalidator();

            if (partitionId == getNodeEngine().getPartitionService().getPartitionId(name)) {
                invalidator.invalidateAllKeys(name, getCallerUuid());
            }

            invalidator.resetPartitionMetaData(name, getPartitionId());
        }
    }
1298842
public void addCacheConfiguration(String partition, Configuration<String, byte[]> configuration) {
		cacheConfigurations.put(partition, configuration);
	}
903004
public void doLocalClear()
    {
        if(log.isDebugEnabled()) log.debug("Clear materialization cache");
        invokeCounter = 0;
        enabledReadCache = false;
        objectBuffer.clear();
    }
276913
public KeyValueStoreUpdate clearAll(String... segments) {
		actions.add(new Deletion("/" + String.join("/", segments)));
		return this;
	}
559829
public void removeMap(String mapId) {
    IndexInformation info = cache.remove(mapId);
    if (info != null) {
      totalMemoryUsed.addAndGet(-info.getSize());
      if (!queue.remove(mapId)) {
        LOG.warn("Map ID" + mapId + " not found in queue!!");
      }
    } else {
      LOG.info("Map ID " + mapId + " not found in cache");
    }
  }
1229758
private void cacheMapping(final String name, final byte[] id) {
    addIdToCache(name, id);
    addNameToCache(id, name);
  }
493087
public CacheManagerTask cleanAreaAsync(Context ctx, BoundingBox bb, int zoomMin, int zoomMax) {
        final CacheManagerTask task = new CacheManagerTask(this, getCleaningAction(), bb, zoomMin, zoomMax);
        task.addCallback(getCleaningDialog(ctx, task));
        return execute(task);
    }
346387
public void clearReplicaSyncRequest(int partitionId, ServiceNamespace namespace, int replicaIndex) {
        ReplicaFragmentSyncInfo syncInfo = new ReplicaFragmentSyncInfo(partitionId, namespace, replicaIndex, null);
        if (!replicaSyncRequests.remove(syncInfo)) {
            return;
        }

        if (logger.isFinestEnabled()) {
            logger.finest("Clearing sync replica request for partitionId=" + partitionId + ", replicaIndex="
                    + replicaIndex + ", namespace=" + namespace);
        }
        releaseReplicaSyncPermits(1);
        replicaSyncTimeoutScheduler.cancelIfExists(syncInfo, null);
    }
925082
@Override
    public synchronized void remove(String key) {
        boolean deleted = getFileForKey(key).delete();
        removeEntry(key);
        if (!deleted) {
            //todo add queue markers
//            JusLog.d("Could not delete cache entry for key=%s, filename=%s",
//                    key, getFilenameForKey(key));
        }
    }
431659
def before_insert(mapper, conn, target):
        """"""

        target._set_ids()

        if target.name and target.vname and target.cache_key and target.fqname and not target.dataset:
            return

        Partition.before_update(mapper, conn, target)
1023313
public void removeFromCache(String id) throws DaoManagerException{
		if (map.containsKey(id)){
			map.remove(id);
		} 
	}
161
public void clearKSMap() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(tc, "Clearing keystore maps");
        synchronized (keyStoreMap) {
            keyStoreMap.clear();
        }
    }
1209083
public void cacheCommand_Clear(boolean waitOnInvalidation, DCache cache) {
        String template = cache.getCacheName();
        synchronized (this) {
            BatchUpdateList bul = getUpdateList(cache);
            bul.invalidateByIdEvents.clear();
            bul.invalidateByTemplateEvents.clear();
            bul.pushCacheEntryEvents.clear();
            bul.pushECFEvents.clear();
            InvalidateByTemplateEvent invalidateByTemplateEvent = new InvalidateByTemplateEvent(template, CachePerf.LOCAL);
            invalidateByTemplateEvent.setCacheCommand_Clear();
            bul.invalidateByTemplateEvents.put(template, invalidateByTemplateEvent);
        }
        if (waitOnInvalidation) {
            wakeUp(0, 0);
        }
    }
268416
public final Operation setPartitionId(int partitionId) {
        this.partitionId = partitionId;
        setFlag(partitionId > Short.MAX_VALUE, BITMASK_PARTITION_ID_32_BIT);
        return this;
    }
1132467
final void clear() {
        while (!resolveCache.isEmpty()) {
            for (Iterator<Entry<String, Entries>> i = resolveCache.entrySet().iterator(); i.hasNext();) {
                Map.Entry<String, Entries> e = i.next();
                i.remove();

                e.getValue().clearAndCancel();
            }
        }
    }
645156
private void removeAllRelatedFromCache(String groupId)
   {
      cache.remove(CacheHandler.GROUP_PREFIX + groupId, CacheType.MEMBERSHIP);
   }
717517
public void cacheCleared(DCache cache) {
        final String methodName = "cacheCleared()";
        ExpirationMetaData expirationMetaData = (ExpirationMetaData)cacheInstancesTable.get(cache);
        if (expirationMetaData == null) {
            return;
        }
        synchronized (expirationMetaData) {
            if (!expirationMetaData.expirationTable.isEmpty()) {
                Enumeration e = expirationMetaData.expirationTable.elements();
                while (e.hasMoreElements()) {
                    InvalidationTask it = (InvalidationTask)e.nextElement();
                    it.reset();
                    taskPool.add(it);
                }
                expirationMetaData.expirationTable.clear();
                expirationMetaData.timeLimitHeap.clear();
                if (tc.isDebugEnabled()){
                	Tr.debug(tc, methodName + cache.getCacheName() + " expirationTable=" + expirationMetaData.expirationTable.size());
                }
            }
        }
    }