Skip to contents

The cachem object backing cached(). Memory-only unless BIOHTTP_CACHE_DISK asks for the disk tier, in which case the two are layered. Built on first use.

Usage

cache()

Value

A cachem cache object.

Details

It is safe to hold the returned object. cache_reset() clears it in place rather than replacing it, unless a cache setting has changed, in which case a differently configured store genuinely has to be built. See cache_reset().

Examples

cache_reset()
class(cache())[1]
#> [1] "cache_mem"