Name
http_url_cache_set, http_url_cache_get, http_url_cache_remove, http_client_cache_enable — direct access to the server-side HTTP-client URL cache
Synopsis
http_url_cache_set(
|
in url varchar, |
| in body any, | |
| in headers any, | |
in ttl_seconds integer); |
any http_url_cache_get(
|
in url varchar); |
http_url_cache_remove(
|
in url varchar); |
http_client_cache_enable(
|
in enabled integer); |
Description
The HTTP client BIFs (http_get,
http_client) maintain an in-memory URL cache to avoid
refetching identical resources. These BIFs expose direct access to that
cache.
http_url_cache_set stores body
(and optional response headers) against
url with an optional time-to-live in seconds.
Subsequent http_get calls for the same URL find the
cached value instead of issuing a network request.
http_url_cache_get returns the cached body for
url, or SQL NULL when no entry is present (or the
entry has expired).
http_url_cache_remove evicts the entry for
url. Pass an empty string to clear the whole cache.
http_client_cache_enable globally toggles the URL
cache (non-zero enables, 0 disables). When disabled, every HTTP-client
call goes to the network regardless of cached entries. Affects the entire
server process.