Package: httpcache 1.2.0

httpcache: Query Cache for HTTP Clients

In order to improve performance for HTTP API clients, 'httpcache' provides simple tools for caching and invalidating cache. It includes the HTTP verb functions GET, PUT, PATCH, POST, and DELETE, which are drop-in replacements for those in the 'httr' package. These functions are cache-aware and provide default settings for cache invalidation suitable for RESTful APIs; the package also enables custom cache-management strategies. Finally, 'httpcache' includes a basic logging framework to facilitate the measurement of HTTP request time and cache performance.

Authors:Neal Richardson [aut, cre]

httpcache_1.2.0.tar.gz
httpcache_1.2.0.zip(r-4.5)httpcache_1.2.0.zip(r-4.4)httpcache_1.2.0.zip(r-4.3)
httpcache_1.2.0.tgz(r-4.4-any)httpcache_1.2.0.tgz(r-4.3-any)
httpcache_1.2.0.tar.gz(r-4.5-noble)httpcache_1.2.0.tar.gz(r-4.4-noble)
httpcache_1.2.0.tgz(r-4.4-emscripten)httpcache_1.2.0.tgz(r-4.3-emscripten)
httpcache.pdf |httpcache.html
httpcache/json (API)

# Install 'httpcache' in R:
install.packages('httpcache', repos = c('https://nealrichardson.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/nealrichardson/httpcache/issues

On CRAN:

cachinghttp-clientlogging

6.45 score 12 stars 11 packages 12 scripts 1.2k downloads 25 exports 9 dependencies

Last updated 2 years agofrom:e42d00fcc2. Checks:OK: 1 NOTE: 6. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 21 2024
R-4.5-winNOTENov 21 2024
R-4.5-linuxNOTENov 21 2024
R-4.4-winNOTENov 21 2024
R-4.4-macNOTENov 21 2024
R-4.3-winNOTENov 21 2024
R-4.3-macNOTENov 21 2024

Exports:buildCacheKeycachedPOSTcacheLogSummarycacheOffcacheOnclearCacheDELETEdropCachedropOnlydropPatternGETgetCachehalthitCacheloadCacheloadLogfilelogMessagePATCHPOSTPUTrequestLogSummarysaveCachesetCachestartLoguncached

Dependencies:askpasscurldigesthttrjsonlitemimeopensslR6sys

Improving API client performance with httpcache

Rendered fromhttpcache.Rmdusingknitr::rmarkdownon Nov 21 2024.

Last update: 2020-12-21
Started: 2016-02-27

Readme and manuals

Help Manual

Help pageTopics
Construct a unique cache key for a requestbuildCacheKey
HTTP Cache APIcache-api getCache hitCache setCache
Manage the HTTP cachecache-management cacheOff cacheOn clearCache
Cache-aware versions of httr verbscached-http-verbs DELETE GET PATCH POST PUT
Cache the response of a POSTcachedPOST
Summarize cache performance from a logcacheLogSummary
Invalidate cachedropCache dropOnly dropPattern
Stop, log, and no callhalt
Read in a httpcache log fileloadLogfile
Log a messagelogMessage
Summarize HTTP requests from a logrequestLogSummary
Save and load cache stateloadCache saveCache
Enable loggingstartLog
Context manager to temporarily turn cache off if it is onuncached