File: forget.Rd

package info (click to toggle)
r-cran-memoise 2.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 208 kB
  • sloc: sh: 10; makefile: 5
file content (29 lines) | stat: -rw-r--r-- 758 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/memoise.R
\name{forget}
\alias{forget}
\title{Forget past results.
Resets the cache of a memoised function. Use \code{\link{drop_cache}} to
reset the cache only for particular arguments.}
\usage{
forget(f)
}
\arguments{
\item{f}{memoised function}
}
\description{
Forget past results.
Resets the cache of a memoised function. Use \code{\link{drop_cache}} to
reset the cache only for particular arguments.
}
\examples{
memX <- memoise(function() { Sys.sleep(1); runif(1) })
# The forget() function
system.time(print(memX()))
system.time(print(memX()))
forget(memX)
system.time(print(memX()))
}
\seealso{
\code{\link{memoise}}, \code{\link{is.memoised}}, \code{\link{drop_cache}}
}