Tyring to nderstand how Squid keeps its cache entry

From: Herman Schultz <hermanschultz200@dont-contact.us>
Date: Sat, 14 Jul 2007 20:26:24 -0700 (PDT)

Hi,

i am trying to understand how Squid keeps its cache entry.

So in the store.c, new_StoreEntry() method, I try to over-ride the entry of the url to be 'http://www.abcde.com" (as a test).

StoreEntry *
new_StoreEntry(int mem_obj_flag, const char *original_url, const char *log_url)

{

    char* dummyURL = "http://www.abcde.com";

    StoreEntry *e = NULL;
    e = memAllocate(MEM_STOREENTRY);
    if (mem_obj_flag)
    e->mem_obj = new_MemObject(dummyURL, log_url);

    //.....
}

And I hit squid using squid client like this

 ./squidclient "http://127.0.0.1/apache2-default/index.html"
// first time, i expect squid will create a cache entry with URL "
http://www.abcde.com", not "http://127.0.0.1/apache2-default/index.html"

but ithe over-ridding does not work.

when I hit ./squidclient "
http://127.0.0.1/apache2-default/index.html", i get a HIT, I exepect a MISS since i override the cache entry to be "http://www.abcde.com
", not "http://127.0.0.1/apache2-default/index.html", right?

Can
you please tell me if my understanding is correctly? if not , can you
please tell me what else am I missing to get this over-riding to work?

Thank you for any pointers.

 
____________________________________________________________________________________
We won't tell. Get more on shows you hate to love
(and love to hate): Yahoo! TV's Guilty Pleasures list.
http://tv.yahoo.com/collections/265
Received on Mon Jul 16 2007 - 07:18:47 MDT

This archive was generated by hypermail pre-2.1.9 : Wed Aug 01 2007 - 12:00:06 MDT