[squid-dev] [PATCH] Revalidate without Last-Modified

Eduard Bagdasaryan eduard.bagdasaryan at measurement-factory.com
Wed Aug 31 14:07:16 UTC 2016


2016-08-25 18:52 GMT+03:00 Alex Rousskov <rousskov at measurement-factory.com>:
 > 4. StoreEntry state reporting.
 >
 > >  describeTimestamps(const StoreEntry * entry)
 > ...
 > >               (int) entry->timestamp,
 > ...
 > > -             (int) entry->lastmod,
 > > +             (int) entry->lastModified(),
 >
 > The debugging should reflect the true value so this is fine. However, we
 > can make this function a StoreEntry method to avoid the need for getter
 > _if_ this is the only place where the getter is needed.


2016-08-27 17:33 GMT+03:00 Amos Jeffries <squid3 at treenet.co.nz>:
 > If the response Squid would emit to the client proxy would contain a
 > synthesized Last-Modified header - then the same synthetic value should
 > be sent in HTCP.


2016-08-30 19:22 GMT+03:00 Alex Rousskov <rousskov at measurement-factory.com>:
 > 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 */


Addressed these comments and updated the patch.

Eduard.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SQUID-209-revalidate-without-last-modified-t3.patch
Type: text/x-patch
Size: 65701 bytes
Desc: not available
URL: <http://lists.squid-cache.org/pipermail/squid-dev/attachments/20160831/00060708/attachment-0001.bin>


More information about the squid-dev mailing list