uncached function

Context manager to temporarily turn cache off if it is on

Context manager to temporarily turn cache off if it is on

If you don't want to store the response of a GET request in the cache, wrap it in uncached(). It will neither read from nor write to cache.

uncached(...)

Arguments

  • ...: Things to evaluate with caching off

Returns

Whatever ... returns.

Details

uncached will not invalidate cache records, if present. It only ignores them.

Examples

uncached(GET("http://httpbin.org/get"))