Skip to contents

Removes all cached responses from the cache directory.

Usage

brapi_cache_clear(con)

Arguments

con

A brapi_connection() object with caching enabled.

Value

Invisibly returns con.

Examples

con <- brapi_connection("https://test-server.brapi.org")
con <- brapi_cache_enable(con, dir = tempdir())
#>  Caching enabled at /tmp/Rtmpb9eCNO (TTL: 3600s)
brapi_cache_clear(con)
#> Warning: cannot remove file '/tmp/Rtmpb9eCNO/bslib-36dd7d54583ca31becd9906e27a99038', reason 'Directory not empty'
#> Warning: cannot remove file '/tmp/Rtmpb9eCNO/downlit', reason 'Directory not empty'
#>  Cleared 4 cached response(s).