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.5-any)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'))

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

Pkgdown site:https://enpiar.com

On CRAN:

Conda:

cachinghttp-clientlogging

6.35 score 13 stars 8 packages 12 scripts 1.2k downloads 25 exports 9 dependencies

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

TargetResultLatest binary
Doc / VignettesOKFeb 19 2025
R-4.5-winNOTEFeb 19 2025
R-4.5-macNOTEFeb 19 2025
R-4.5-linuxNOTEFeb 19 2025
R-4.4-winNOTEFeb 19 2025
R-4.4-macNOTEFeb 19 2025
R-4.3-winNOTEFeb 19 2025
R-4.3-macNOTEFeb 19 2025

Exports:buildCacheKeycachedPOSTcacheLogSummarycacheOffcacheOnclearCacheDELETEdropCachedropOnlydropPatternGETgetCachehalthitCacheloadCacheloadLogfilelogMessagePATCHPOSTPUTrequestLogSummarysaveCachesetCachestartLoguncached

Dependencies:askpasscurldigesthttrjsonlitemimeopensslR6sys

Improving API client performance with httpcache

Rendered fromhttpcache.Rmdusingknitr::rmarkdownon Feb 19 2025.

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