Dr_Cache_Init; Dr_Cache_Refresh - Netscape ENTERPRISE SERVER 6.1 - NSAPI PROGRAMMER GUIDE Manual

Nsapi
Table of Contents

Advertisement

dr_cache_init

The
dr_cache_init
failure. It is called by an
Syntax
PRInt32 dr_cache_init(DrHdl *hdl, RefreshFunc_t ref, FreeFunc_t fre,
CompareFunc_t cmp, PRUint32 maxEntries, PRIntervalTime maxAge);
Returns
if successful.
1
if an error occurs.
0
Parameters
is a pointer to an unallocated handle.
DrHdl hdl
RefreshFunc_t ref
the
flag and
DR_CHECK
is a pointer to a function that frees an entry.
FreeFunc_t fre
CompareFunc_t cmp
PRUint32 maxEntriesp
for a given
.
hdl
PRIntervalTime maxAgep
, the cache never expires.
0
Example
if(!dr_cache_init(&hdl, (RefreshFunc_t)FnRefresh,
(FreeFunc_t)FnFree, (CompareFunc_t)FnCompare, 150000,
PR_SecondsToInterval(7200)))
{
ereport(LOG_FAILURE, "dr_cache_init() failed");
return(REQ_ABORTED);
}

dr_cache_refresh

The
dr_cache_refresh
the plugin requires it. This can be achieved by passing NULL for the
in
and by passing
dr_cache_init
passed to
dr_net_write
a new content in the entry and call
calling
dr_net_write
function creates a persistent handle to the cache, or NULL on
SAF.
Init
is a pointer to a cache refresh function. This can be NULL; see
return value for
DR_EXPIR
is is a pointer to a key comparator function.
is the maximum number of entries possible in the cache
is the maximum amount of time that an entry is valid. If
function provides a way of refreshing a cache entry when
DR_CHECK
and it returns with
dr_cache_refresh
again to send the response.
Appendix F
.
dr_net_write
in a
call. If
dr_net_write
, the plugin should generate
DR_EXPIR
with that entry before
Dynamic Results Caching Functions
parameter
ref
is
DR_CHECK
339

Advertisement

Table of Contents
loading

This manual is also suitable for:

Enterprise server 6.1

Table of Contents