lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lynx-dev uncacheing of internal pages in lynx


From: Leonid Pauzner
Subject: lynx-dev uncacheing of internal pages in lynx
Date: Fri, 9 Apr 1999 18:27:49 +0400 (MSD)

Thinking a little more about reloading of lynx.cfg code
I realize that when we press "RELAD THE CHANGES" several times
we remove obsolete temp files for this menu but HText's will not uncached,
so we waste a cache and push real documents out of cache.
This can be fixed like this

diff -u old/lyreadcf.c ./lyreadcf.c
--- old/lyreadcf.c      Tue Apr  6 15:42:40 1999
+++ ./lyreadcf.c        Fri Apr  9 17:32:40 1999
@@ -1420,6 +1420,7 @@
            if (!HTLoadAbsolute(&WWWDoc))
                return(NOT_FOUND);

+           HTuncache_current_document();

        /*  now set up the flag and fall down to create a new LYNXCFG:/ page */
         local_url = 0;  /* see below */


but the problem more common, from GridText.c/HText_new():


    if (!loaded_texts)  {
        loaded_texts = HTList_new();
        atexit(free_all_texts);
    }

    /*
     *  Links between anchors & documents are a 1-1 relationship.  If
     *  an anchor is already linked to a document we didn't call
     *  HTuncache_current_document(), e.g., for the showinfo, options,
     *  download, print, etc., temporary file URLs, so we'll check now
     *  and free it before reloading. - Dick Wesseling (address@hidden)
     */
    if (anchor->document) {
        HTList_removeObject(loaded_texts, anchor->document);
        CTRACE(tfp, "GridText: Auto-uncaching\n") ;
        ((HText *)anchor->document)->node_anchor = NULL;
        HText_free((HText *)anchor->document);
        anchor->document = NULL;
    }

Seems this comment referring the old behaviour when
every internal page had a fixed temp file name.
Currently, we create a newer copy of internal page in another temp file
so we got a different URL and the code above is not working.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]