buildCacheKey function

Construct a unique cache key for a request

Construct a unique cache key for a request

This function encapsulates the logic of making a cache key, allowing other code or libraries to access the HTTP cache programmatically.

buildCacheKey(url, query = NULL, body = NULL, extras = c())

Arguments

  • url: character request URL
  • query: Optional query parameters for the request
  • body: Optional request body
  • extras: character Optional additional annotations to include in the cache key.

Returns

Character value, starting with url and including hashed query and body values if provided, to be used as the cache key for this request.