![Netscape ENTERPRISE SERVER 6.1 Скачать руководство пользователя страница 341](http://html1.mh-extra.com/html/netscape/enterprise-server-6-1/enterprise-server-6-1_manual_1674653341.webp)
Appendix
F
Dynamic Results Caching Functions
341
By default, this function refreshes the cache entry if it has expired by making a call
to the
ref
function passed to
dr_cache_init
. If no cache entry is found with the
specified
key
, this function adds a new cache entry by calling the
ref
function
before sending out the response. However if the
DR_CHECK
flag is passed in the
flags
parameter and if either the cache entry has expired or the cache entry
corresponding to the
key
does not exist,
dr_net_write
does not send any data out.
Instead it returns with
DR_EXPIR
.
If
ref
(passed to
dr_cache_init
) is NULL, the DR_CHECK flag is not passed in
the
flags
parameter, and the cache entry corresponding to the
key
has expired or
does not exist,
dr_net_write
fails with
DR_ERROR
. However,
dr_net_write
refreshes the cache if
ref
is not NULL and
DR_CHECK
is not passed.
If
ref
(passed to
dr_cache_init
) is NULL and the
DR_CHECK
flag is not passed but
DR_IGNORE
is passed and the entry is present in the cache,
dr_net_write
sends out
the response even if the entry has expired. However, if the entry is not found,
dr_net_write
returns
DR_ERROR
.
If
ref
(passed to
dr_cache_init
) is not NULL and the
DR_CHECK
flag is not passed
but
DR_IGNORE
is passed and the entry is present in the cache,
dr_net_write
sends
out the response even if the entry has expired. However, if the entry is not found,
dr_net_write
calls the
ref
function and stores the new entry returned from
ref
before sending out the response.
Syntax
PRInt32 dr_net_write(DrHdl hdl, const char *key, PRUint32 klen,
const char *hdr, const char *ftr, PRUint32 hlen, PRUint32 flen,
PRIntervalTime timeout, PRUint32 flags, Request *rq, Session *sn);
Returns
IO_OKAY
if successful.
IO_ERROR
if an error occurs.
DR_ERROR
if an error in cache handling occurs.
DR_EXPIR
if the cache has expired.
Parameters
DrHdl hdl
is a persistent handle created by the
dr_cache_init
function.
const char *key
is the key to cache, search, or refresh.
PRUint32 klen
is the length of the key in bytes.
const char *hdr
is any header data (which can be NULL).
const char *ftr
is any footer data (which can be NULL).
Содержание ENTERPRISE SERVER 6.1
Страница 1: ...NSAPI Programmer s Guide Netscape Enterprise Server Version6 1 April 2002 Draft...
Страница 18: ...Where to Find Related Information 18 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Страница 138: ...CGI to NSAPI Conversion 138 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Страница 214: ...NSAPI Functions in Alphabetical Order 214 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Страница 290: ...Miscellaneous 290 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Страница 310: ...The Netscape LDAP Schema 310 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Страница 318: ...cinfo 318 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Страница 324: ...Sample MIME Types File 324 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Страница 336: ...Buffered Streams 336 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Страница 344: ...344 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Страница 350: ...350 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Страница 356: ...356 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...