[squid-dev] [PATCH] Revalidate without Last-Modified
Alex Rousskov
rousskov at measurement-factory.com
Tue Aug 30 16:22:17 UTC 2016
On 08/30/2016 04:35 AM, Eduard Bagdasaryan wrote:
> 2016-08-28 1:12 GMT+03:00 Alex Rousskov <rousskov at measurement-factory.com>:
>> Not all HTCP clients are Squids, but how does Squid code treat such an
>> HTCP TST response?
> It seems that Squid does not care whether HTCP response contains LMT or
> not. Moreover, it looks that all TST response headers are only parsed
> inside htcpHandleTstResponse() without using them further for making
> any decisions
Wow. That finding combined with Amos assertion that
effectiveModificationTime() is always acceptable as the lastmod
value strongly suggests that there is no need to distinguish the two.
How about this:
void lastModified(const time_t when) { lastModified_ = when; }
time_t lastModified() const
{
// may still return -1 if timestamp is not set
return lastModified_ < 0 ? timestamp : lastModified_;
}
and completely removing effectiveModificationTime()?
I also think that we should rename/hide lastmod because it reduces the
chances that somebody will access the [negative] data member directly:
> /* START OF ON-DISK STORE_META_STD TLV field */
> time_t timestamp;
> time_t lastref;
> time_t expires;
> private:
> time_t lastModified_; ///< received Last-Modified value or -1; use lastModified()
> public:
> uint64_t swap_file_sz;
> uint16_t refcount;
> uint16_t flags;
> /* END OF ON-DISK STORE_META_STD */
Thank you,
Alex.
More information about the squid-dev
mailing list