On 16/09/2016 7:09 p.m., Hardik Dangar wrote:
> *Amos,*
> Thanks for the reply but it seems i am not able to tell you what i
> want to do. i don't want to cache repo files. i want to cache .zip
> files only. i don't want .git file to cache but only .zip files which
> are fetch from github.com,

I undersand that. Maybe my reply was not clear about the problem being

> Also you have said things about commits but i am talking about zip
> file which is given by github via download button or composer fetches
> those files via command line directly. as soon as someone commits zip
> file's ETag is changed when you fetch it.

That is because the .zip file is generated by github on-demand.

When someone commmits something to the repository the contents of the
next .zip to be downloaded change. The ETag is, or represents, a hash of
the .zip current contents.

> So there is no way to achieve this ? Do you think there is a way to
> achieve this ?

Since the .zip file (and ETag) is able to change at any time Squid
cannot know whether the file it has from a previous request is still
usable. Current versions of Squid must fetch a new .zip to find out - at
that point they might as well just deliver the new copy.

Future Squid releases** will allow these .zip object to be cached and
reused for a short period defined by a matching refresh_pattern line.

But really, unless github change how they create those .zip files
caching of them will not work very well.

** If you really need this behaviour right now you can build the latest
Squid-4 snapshot and apply Eduards patch from


squid-users mailing list

Reply via email to