Cache API calls locally
And do this by default. A problem is that the underlying R.cache
package does not provide an expiry mechanism.
To set up an ideal expiry mechanism, the KorAPConnection constructor
should be able to get some short information about API and index
version. This can be handled later, see
https://github.com/KorAP/Krill/issues/62
Change-Id: Ia7a8d6f0800a67d3ab39f162444751e2818d29bd
diff --git a/man/KorAPConnection-class.Rd b/man/KorAPConnection-class.Rd
index fbe932b..d903fbb 100644
--- a/man/KorAPConnection-class.Rd
+++ b/man/KorAPConnection-class.Rd
@@ -7,16 +7,20 @@
\alias{initialize,KorAPConnection-method}
\alias{apiCall,KorAPConnection-method}
\alias{apiCall}
+\alias{clearCache,KorAPConnection-method}
+\alias{clearCache}
\alias{show,KorAPConnection-method}
\title{Class KorAPConnection}
\usage{
\S4method{initialize}{KorAPConnection}(.Object,
KorAPUrl = "https://korap.ids-mannheim.de/", apiVersion = "v1.0",
apiUrl, userAgent = "R-KorAP-Client", timeout = 10,
- verbose = FALSE)
+ verbose = FALSE, cache = TRUE)
\S4method{apiCall}{KorAPConnection}(kco, url)
+\S4method{clearCache}{KorAPConnection}(kco)
+
\S4method{show}{KorAPConnection}(object)
}
\arguments{
@@ -34,6 +38,8 @@
\item{verbose}{logical. Decides whether following operations will default to be verbose.}
+\item{cache}{logical. Decides if API calls are cached locally. You can clear the cache with \code{\link{clearCache}()}.}
+
\item{kco}{KorAPConnection object}
\item{url}{request url}
diff --git a/man/KorAPCorpusStats-class.Rd b/man/KorAPCorpusStats-class.Rd
index 4b8b98a..0d2e46c 100644
--- a/man/KorAPCorpusStats-class.Rd
+++ b/man/KorAPCorpusStats-class.Rd
@@ -12,7 +12,7 @@
\item{object}{KorAPCorpusStats object}
}
\description{
-\code{KorAPCorpusStats} objetcs can hold information about a corpus or virtual corpus.
+\code{KorAPCorpusStats} objects can hold information about a corpus or virtual corpus.
\code{KorAPCorpusStats} objects can be obtained by the \code{\link{corpusStats}()} method.
}
\section{Slots}{