diff --git a/network/main/makefile.win b/network/main/makefile.win index 51ad1d33718c..029e1dc80740 100644 --- a/network/main/makefile.win +++ b/network/main/makefile.win @@ -106,7 +106,11 @@ LIBRARY_NAME=network EXTRA_LIBS= -REQUIRES= foo parse jtools java zlib nspr dbm util network js security mimetype ldap imap4url ldapurl net progress +!ifdef NU_CACHE +REQUIRES= foo parse jtools java zlib nspr dbm util network js security mimetype ldap imap4url ldapurl net progress cachelib +!else +REQUIRES= foo parse jtools java zlib nspr dbm util network js security mimetype ldap imap4url ldapurl net progress +!endif EXPORTS= mkstream.h \ net_xp_file.h \ mkparse.h \ @@ -152,6 +156,9 @@ LINCS=-I$(PUBLIC)\jtools \ -I$(PUBLIC)\cnetinit \ -I$(PUBLIC)\mimetype \ -I$(PUBLIC)\network \ +!ifdef NU_CACHE + -I$(PUBLIC)\cache \ +!endif -I$(PUBLIC)\ldap \ -I$(PUBLIC)\net \ -I$(PUBLIC)\progress \ diff --git a/network/main/mkhelp.c b/network/main/mkhelp.c index e5d1d9a50eaf..9f573511782d 100644 --- a/network/main/mkhelp.c +++ b/network/main/mkhelp.c @@ -994,9 +994,13 @@ NET_HTMLHelpMapToURL(int format_out, } memset(obj, 0, sizeof(html_help_map_stream)); - - if(URL_s->cache_file || URL_s->memory_copy) - obj->file_is_local = TRUE; +#ifdef NU_CACHE + if (URL_s->cache_file || URL_s->cache_object) + obj->file_is_local = TRUE; +#else + if(URL_s->cache_file || URL_s->memory_copy) + obj->file_is_local = TRUE; +#endif else obj->file_is_local = NET_IsLocalFileURL(URL_s->address); diff --git a/network/main/mkutils.c b/network/main/mkutils.c index d7c6027a4352..51962fff4da4 100644 --- a/network/main/mkutils.c +++ b/network/main/mkutils.c @@ -63,6 +63,9 @@ #include "pics.h" #endif +#ifdef NU_CACHE +#include "CacheStubs.h" +#endif typedef struct { char *buffer; @@ -1376,12 +1379,17 @@ NET_ParseMimeHeader(FO_Present_Types outputFormat, found_one = TRUE; } else if(!PL_strncasecmp(name,"EXT-CACHE:",10)) - { +#ifdef NU_CACHE + { + PR_ASSERT(0); + /* Cool find... somebody uses this? let me know -Gagan */ + } +#else + { #ifdef MOZILLA_CLIENT char * next_arg = strtok(value, ";"); char * name=0; char * instructions=0; - found_one = TRUE; while(next_arg) @@ -1409,6 +1417,7 @@ NET_ParseMimeHeader(FO_Present_Types outputFormat, PR_ASSERT(0); #endif /* MOZILLA_CLIENT */ } +#endif /* NU_CACHE */ else if (!PL_strncasecmp(name, "ETAG:",5)) { /* Weak Validators are skipped for now*/ @@ -3505,8 +3514,12 @@ NET_GetURLQuick (URL_Struct * URL_s, MWContext * context, Net_GetUrlExitFunc* exit_routine) { - if (!NET_FindURLInMemCache(URL_s, context) && +#ifdef NU_CACHE + if (!CacheManager_Contains(URL_s->address)) +#else + if (!NET_FindURLInMemCache(URL_s, context) && !NET_FindURLInExtCache(URL_s, context)) +#endif { /* default */ return NET_GetURL(