Determines if the Traffic Server cache is initialized and ready to accept requests for the specified data type.
INKReturnCode INKCacheReady (int
*
is_ready
)
If the cache is ready, then the int *
argument is set to a non-zero value. It is set to 0 if the cache is not
ready.is_ready
Asks the Traffic Server cache if it is initialized and ready to accept requests. If the cache is not initialized, then any attempts to read, write, or remove documents will fail.
When a plugin starts (i.e., when its
INKPluginInit
function is called), there is
no guarantee that the cache is already initialized. This API is
useful if a plugin needs to access the cache from the
INKPluginInit
function. If the cache is not
ready, then the plugin should retry later.
INK_SUCCESS
if the API is called
successfully.
INK_ERROR
if this function cannot be set or
if it is invalid.