Timestamps in swap.state

From: Christian Grimm <grimm@dont-contact.us>
Date: Tue, 24 Aug 1999 19:19:49 +0200

Hi,

I started some analysis on swap.state content and - no wonder - run into a
couple of questions.

First, compared to squid 1.X, in recent squid versions we've now
four time related entries (see also FAQ section 6.8):

- timestamp
- lastref
- expires
- lastmod

Obviously timestamp contains no longer "the time when the object was last
verified to be current". This value has moved to the new entry lastref,
right? I assume that timestamp now contains the given value in the "Date:"
line of the servers http reply. Otherwise someone should explain why i
found nice entries like "Wed Jul 8 14:38:08 2020" in some timestamp fields
of my squid 2.2 swap.state file.

Next question is about the remaining entries expires and lastmod. FAQ says
that in squid 1.1 a -1 (resp. 0xffffffff) indicates invalid time labels,
-2 (resp. 0xfffffffe) missing ones. Still true today? See this demo
output of a swap.state file:

# Objects 600.887
# Objects without lastmod 0 ( check if lastmod = -2)
# Objects with invalid lastmod 37.027 ( check if lastmod = -1)
# Objects without expire 517 ( check if expire = -2)
# Objects with invalid expire 586.434 ( check if expire = -1)

Is it possible that now in squid 2.X a -1 signs a missing entry and -2 an
invalid one? If not, what may cause such a huge number (about 98%) of
invald expire entries?

I know the answer is in the sources. The default setting for all four time
fields is -1 (in store.c), but i don't know if these values remain
unchanged for missing (this would make sense) or invalid timestamps.

Any comments?

Thanks in advance,
Christian
Received on Tue Jul 29 2003 - 13:16:00 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:12:17 MST