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/NAMESPACE b/NAMESPACE
index 4f4c1c5..58e75e0 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -4,6 +4,7 @@
exportClasses(KorAPConnection)
exportClasses(KorAPCorpusStats)
exportClasses(KorAPQuery)
+exportMethods(clearCache)
exportMethods(corpusQuery)
exportMethods(corpusStats)
exportMethods(fetchAll)
@@ -11,6 +12,7 @@
exportMethods(fetchRest)
exportMethods(initialize)
exportMethods(show)
+import(R.cache)
import(httr)
import(jsonlite)
import(methods)