Dr_Net_Write - Netscape ENTERPRISE SERVER 6.1 - NSAPI PROGRAMMER GUIDE Manual

Nsapi
Table of Contents

Advertisement

The plugin may simply decide to replace the cached entry even if it has not expired
(based on some other business logic). The
this case. This way the plugin does the cache refresh management actively by itself.
Syntax
PRInt32 dr_cache_refresh(DrHdl hdl, const char *key, PRUint32 klen,
PRIntervalTime timeout, Entry *entry, Request *rq, Session *sn);
Returns
if successful.
1
if an error occurs.
0
Parameters
DrHdl hdl
const char *key
PRUint32 klen
PRIntervalTime timeout
passed, the
Entry *entry
Request *rq
Session *sn
Example
Entry entry;
char *key = "MOVIES"
GenNewMovieList(&entry.data, &entry.dataLen);
if(!dr_cache_refresh(hdl, key, strlen(key), 0, &entry, rq, sn))
{
ereport(LOG_FAILURE, "dr_cache_refresh() failed");
return REQ_ABORTED;
}

dr_net_write

The
dr_net_write
constructing the full page with
(located using the
them can be NULL. If
DR_NONE
340
Netscape Enterprise Server NSAPI Programmer's Guide • April 2002 (Draft)
is a persistent handle created by the
is the key to cache, search, or refresh.
is the length of the key in bytes.
is the expiration time of this entry. If a value of 0 is
value passed to
maxAge
is the not NULL entry to be cached.
is a pointer to the request.
is a pointer to the session.
function sends a response back to the requestor after
), and
key
ftr
is NULL, no cache lookup is done; the caller must pass
hdl
as the flag.
dr_cache_refresh
dr_cache_init
dr_cache_init
, the content of the cached entry as the body
hdr
. The
,
, or
hdr
ftr
hdl
function is useful in
function.
is used.
// Implemented by
// plugin developer
can be NULL, but not all of

Advertisement

Table of Contents
loading

This manual is also suitable for:

Enterprise server 6.1

Table of Contents