% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/interface.R
\name{invalidate_cache}
\alias{invalidate_cache}
\title{Invalidate the cache of a graph}
\usage{
invalidate_cache(graph)
}
\arguments{
\item{graph}{The graph whose cache is to be invalidated.}
}
\value{
The graph with its cache invalidated. Since the graph is modified
in place in R as well, you can also ignore the return value.
}
\description{
igraph graphs cache some basic properties (such as whether the graph is a
DAG or whether it is simple) in an internal data structure for faster
repeated queries. This function invalidates the cache, forcing a
recalculation of the cached properties the next time they are needed.
}
\details{
You should not need to call this function during normal usage; however, it
may be useful for debugging cache-related issues. A tell-tale sign of an
invalid cache entry is when the result of a cached function (such as
\code{\link{is_dag}()} or \code{\link{is_simple}()}) changes after calling
this function.
}
\section{Related documentation in the C library}{
\href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_invalidate_cache}{\code{invalidate_cache()}}
}

\examples{
g <- make_ring(10)
# Cache is populated when calling is_simple()
is_simple(g)
# Invalidate cache (for debugging purposes)
invalidate_cache(g)
# Result should be the same
is_simple(g)
}
\concept{low-level operations}
