[squid-users] Squid with PHP & Apache

From: Ghassan Gharabli <sounarose_at_googlemail.com>
Date: Mon, 25 Nov 2013 23:13:06 +0200

 Hi,

I have built a PHP script to cache HTTP 1.X 206 Partial Content like
"WindowsUpdates" & Allow seeking through Youtube & many websites .

I am willing to move from PHP to C++ hopefully after a while.

The script is almost finished , but I have several question, I have no
idea if I should always grab the HTTP Response Headers and send them
back to the borwsers.

1) Does Squid still grab the "HTTP Response Headers", even if the
object is already in cache or Squid has already a cached copy of the
HTTP Response header . If Squid caches HTTP Response Headers then how
do you deal with HTTP CODE 302 if the object is already cached . I am
asking this question because I have already seen most websites use
same extensions such as .FLV including Location Header.

2) Do you also use mime.conf to send the Content-Type to the browser
in case of FTP/HTTP or only FTP ?

3) Does squid compare the length of the local cached copy with the
remote file if you already have the object file or you use
refresh_pattern?.

4) What happens if the user modies a refresh_pattern to cache an
object, for example .xml which does not have [Content-Length] header.
Do you still save it, or would you search for the ignore-headers used
to force caching the object and what happens if the cached copy
expires , do you still refresh the copy even if there is no
Content-Length header?.

I am really confused with this issue , because I am always getting a
headers list from the internet and I send them back to the browser
(using PHP and Apache) even if the object is in cache.

Your help and answers will be much appreciated

Thank you

Ghassan
Received on Mon Nov 25 2013 - 21:13:14 MST

This archive was generated by hypermail 2.2.0 : Wed Nov 27 2013 - 12:00:08 MST