Cache questions.

Hi,

Is that possible that function getting URL would return file pointer to the
cached object (if it is in cache)? Now the function LoadToFile (if url is
in cache) copies from cache to file. I just want to read from those files, and
there are many of them in my application so the copying is very inefficient.

Also wwwlib allows to get pointer to cached file (using HTCache_find and
HTCache_name) there seem to be no function to explicitly verify freshness of
the cached object. The function HTCache_isFresh just returns flag indicating
that object should be validated (no validation function is provided - at least I
did not find one).

It would be good to have function that allows to read cached object directly
from cache (and the validation could be done automatically). Also explicit
validation function would be helpful.

Also in cache's .index file for all entries "must_revalidate" has value 0
(I guess that "must_revalidate" is the last value for each cached entry in
.index (?)). In my application I am setting:  

        HTRequest_setReloadMode(req,HT_CACHE_VALIDATE); // for all requests
        HTCacheMode_setExpires(HT_EXPIRES_AUTO);
        
But still for cached entries HTCache_isFresh always returns HT_CACHE_OK. 
I also set: 

        HTRequest_addCacheControl(request, "must-revalidate", ""); 

it did not change anything. Am I missing something in settings? 

As I found out must_revalidate is set from responce's cache_control AssocList.
Is it 
        - the same list as request's cache_control list
        - or altered request's cache_control list
        - or they do not have anything in common? 

How can I then control reloading?

Thank you,

        Olga Antropova.

----------------------------------
E-Mail: olga <olga@eai.com>
Date: 19-Nov-98
Time: 16:58:54

This message was sent by XFMail
----------------------------------

Received on Thursday, 19 November 1998 19:31:46 UTC