Clear cached report data
@param string|null $handler_id
@param integer|string|null $store_id
163567
public function clearCache($handler_id = null, $store_id = null)
    {
        $pattern = 'ga_report.';

        if (isset($handler_id)) {
            $pattern .= "$handler_id.";
        }

        if (isset($store_id)) {
            $pattern .= "$store_id";
        }

        $this->cache->clear('', array('pattern' => "$pattern*"));
    }
668043
public void deleteDataStore(final int id) {
        invoke(DATA_STORES, id,
                new RequestClosure<JsonStructure>() {
                    @Override
                    public JsonStructure call(Invocation.Builder request) {
                        Response response = request.delete();
                        if (response.getStatusInfo().getFamily() != Response.Status.Family.SUCCESSFUL) {
                            throw new ResponseParseException(DATA_STORES, id, null, null);
                        }
                        return null;
                    }
                },
                null
        );
    }
32023
public function getHandler($handler_id)
    {
        $handlers = $this->getHandlers();
        return empty($handlers[$handler_id]) ? array() : $handlers[$handler_id];
    }
574803
protected function updateStore($store_id)
    {
        if (!$this->isError() && !$this->store->update($store_id, $this->getSubmitted())) {
            $this->errorAndExit($this->text('Unexpected result'));
        }
    }
360683
function clear(callback) {
	        var self = this;

	        var promise = new Promise(function (resolve, reject) {
	            self.ready().then(function () {
	                var dbInfo = self._dbInfo;
	                dbInfo.db.transaction(function (t) {
	                    t.executeSql('DELETE FROM ' + dbInfo.storeName, [], function () {
	                        resolve();
	                    }, function (t, error) {
	                        reject(error);
	                    });
	                });
	            })['catch'](reject);
	        });

	        executeCallback(promise, callback);
	        return promise;
	    }
741684
def delete(self, *args, **kwargs):
        """"""
        # Store ids in memory as relations are also deleted with the Data object.
        storage_ids = list(self.storages.values_list('pk', flat=True))  # pylint: disable=no-member

        super().delete(*args, **kwargs)

        Storage.objects.filter(pk__in=storage_ids, data=None).delete()
1143619
public void clearHandlers() {

        for (Map<String, CmsAttributeHandler> handlers : m_handlers) {
            for (CmsAttributeHandler handler : handlers.values()) {
                handler.clearHandlers();
            }
            handlers.clear();
        }
        m_handlers.clear();
        m_handlers.add(new HashMap<String, CmsAttributeHandler>());
        m_handlerById.clear();
    }
547326
public void unsetWsTraceHandler(String id, WsTraceHandler ref) {
        if (id != null) {
            if (ref == null) {
                wsTraceHandlerServices.remove(id);
            } else {
                wsTraceHandlerServices.remove(id, ref);
            }
        }
    }
683582
public function clear($cache_id, $options = array())
    {
        $result = null;
        $options += array('pattern' => '.cache');
        $this->hook->attach('cache.clear.before', $cache_id, $options, $result, $this);

        if (isset($result)) {
            return $result;
        }

        $result = true;

        if ($cache_id === null) {
            array_map('unlink', glob(GC_DIR_CACHE . '/*.cache'));
            gplcart_static_clear();
        } else {

            if (is_array($cache_id)) {
                $cache_id = gplcart_array_hash($cache_id);
            }

            array_map('unlink', glob(GC_DIR_CACHE . "/$cache_id{$options['pattern']}"));
            gplcart_static_clear($cache_id);
        }

        $this->hook->attach('cache.clear.after', $cache_id, $options, $result, $this);
        return (bool) $result;
    }
1222983
public function clear_cache( $data, $pod = null, $id = null, $groups = null, $post = null ) {

		$old_post = $id;

		if ( ! is_object( $id ) ) {
			$old_post = null;
		}

		if ( is_object( $post ) && $this->object_type != $post->post_type ) {
			return;
		}

		if ( ! is_array( $data ) && 0 < $data ) {
			$post = $data;
			$post = get_post( $post );
		}

		if ( $this->object_type == $post->post_type ) {
			pods_transient_clear( 'pods_object_pages' );

			if ( is_object( $old_post ) && $this->object_type == $old_post->post_type ) {
				pods_cache_clear( $old_post->post_title, 'pods_object_page_wildcard' );
			}

			pods_cache_clear( $post->post_title, 'pods_object_page_wildcard' );

			self::flush_rewrites();
		}
	}
554820
public void removeServerFromCache(long serverId) {
        servers.computeIfPresent(serverId, (key, server) -> {
            ((Cleanupable) server).cleanup();
            return null;
        });
        nonReadyServers.computeIfPresent(serverId, (key, server) -> {
            ((Cleanupable) server).cleanup();
            return null;
        });
    }
865198
public function delete($address_id, $check = true)
    {
        $result = null;
        $this->hook->attach('address.delete.before', $address_id, $check, $result, $this);

        if (isset($result)) {
            return (bool) $result;
        }

        if ($check && !$this->canDelete($address_id)) {
            return false;
        }

        $result = (bool) $this->db->delete('address', array('address_id' => $address_id));
        $this->hook->attach('address.delete.after', $address_id, $check, $result, $this);
        return (bool) $result;
    }
954635
public function destroy($session_id = null)
    {
        @session_unset();
        if ($session_id === null) {
            $session_id = $this->getId();
        }
        return $this->cache->delete($this->prefix.$session_id);
    }
340392
public synchronized void removeSessionLogs(SessionId sessionId) {
    if (storeLogsOnSessionQuit) {
      return;
    }
    ThreadKey threadId = sessionToThreadMap.get(sessionId);
    SessionId sessionIdForThread = threadToSessionMap.get(threadId);
    if (threadId != null && sessionIdForThread != null && sessionIdForThread.equals(sessionId)) {
      threadToSessionMap.remove(threadId);
      sessionToThreadMap.remove(sessionId);
    }
    perSessionRecords.remove(sessionId);
    logFileRepository.removeLogFile(sessionId);
  }
466969
@SuppressWarnings({ "rawtypes", "unchecked" })
    private void cleanupSessions(List<String> storeNamesToCleanUp) {

        logger.info("Performing cleanup");
        for(String store: storeNamesToCleanUp) {

            for(Node node: nodesToStream) {
                try {
                    SocketAndStreams sands = nodeIdStoreToSocketAndStreams.get(new Pair(store,
                                                                                        node.getId()));
                    close(sands.getSocket());
                    SocketDestination destination = nodeIdStoreToSocketRequest.get(new Pair(store,
                                                                                            node.getId()));
                    streamingSocketPool.checkin(destination, sands);
                } catch(Exception ioE) {
                    logger.error(ioE);
                }
            }

        }

        cleanedUp = true;

    }
149844
static function cleanupOrder( $orderID )
    {
        $db = eZDB::instance();
        $orderID =(int) $orderID;
        $rows = $db->arrayQuery( "SELECT productcollection_id, order_nr FROM ezorder WHERE id='$orderID'" );
        if ( count( $rows ) > 0 )
        {
            // Who deletes which order in shop should be logged.
            eZAudit::writeAudit( 'order-delete', array( 'Order ID' => $orderID,
                                                        'Comment' => 'Removed the order and its related data from the database: eZOrder::cleanupOrder()' ) );

            $productCollectionID = $rows[0]['productcollection_id'];
            $orderNr = (int)$rows[0]['order_nr'];
            $db = eZDB::instance();
            $db->begin();
            $db->query( "DELETE FROM ezorder where id='$orderID'" );
            $db->query( "DELETE FROM ezproductcollection where id='$productCollectionID'" );
            $db->query( "DELETE FROM ezproductcollection_item where productcollection_id='$productCollectionID'" );
            $db->query( "DELETE FROM ezorder_status_history WHERE order_id=$orderNr" );
            $db->commit();
        }
    }
330474
protected static function flush_store() {
        $ids = array_keys(self::$sessionstore);
        unset(self::$sessionstore);
        self::$sessionstore = array();
        foreach ($ids as $id) {
            self::$sessionstore[$id] = array();
        }
    }