[squid-users] PushCache Patch: store_swapout.c question

From: OTR Comm <otrcomm@dont-contact.us>
Date: Mon, 13 Dec 2004 15:33:24 -0700

Hello,

I have asked this question before, but I still can't figure it out!

When a file is written to cache, where does Squid figure out which cache
directory to store the file in?

I see in store_swapout.c where e->swap_filen and e->swap_dirn are
assigned, but if I write these out witha debug statement, I get:

<snip>
dirno 0, fileno 00000000
<snip>

and on my system, this file went to:

/usr/local/squid/var/cache/00/00/00000000

what I need to know is where does squid genetrate the '00/00' part of
the path? And how does 'dirno 0' enter into this calculation?

What I am trying to do is make a record in MySQL of each file pushed to
the server so I can go back to each of the cache entries by path and
filename, and work with the specific file.

Thanks,
Murrah Boswell
Received on Mon Dec 13 2004 - 15:26:57 MST

This archive was generated by hypermail pre-2.1.9 : Sat Jan 01 2005 - 12:00:02 MST