Page 1 of 1

Need To Cache Domain with Squid

Posted: Thu Mar 11, 2010 2:57 am
by volomike
Aaaah!!! I give up!!!

After hours of working at this and not getting very far, I need to use Squid3 on Ubuntu (I'm on 8.04.4) such that requests to example.com from PHP (and Curl) get routed through a transparent Squid proxy in caching mode to cache requests for 1 day, but all other requests pass right on through.

I managed to get my iptables such that it routes into Squid3, but then it goes into pass-through mode and doesn't cache anything. I know this because I tried to cache volomike.com domain requests, and then tested with:

$ squid3client -t http://volomike.com/

If caching is setup properly, then you'll get one MISS on the first attempt, and then HIT responses on every time after that. But instead, all I received were MISS responses.

And why do I need to do this? Well, I'm mired down in another project, but a separate project that uses Curl requests against example.com is having trouble. The programmer that built that code was fired, and it's spaghetti code. Instead of me fixing the Curl in the PHP to do caching, I simply want a quick-fix solution with Squid3 where we route requests through it.

Re: Need To Cache Domain with Squid

Posted: Thu Mar 11, 2010 7:50 am
by VladSun
Can you describe your setup and network configuration/topology in more details?

Also post your squid config files and iptables rules.

Re: Need To Cache Domain with Squid

Posted: Sat Mar 13, 2010 8:45 pm
by volomike
Sorry, but I was told by the client (because of time issues) to park it on this and let the sysop try some options out for now, and got redirected to another "fire" for now (another project). But that fire will be out soon and I'll be back to see what the sysop has figured out. More than likely he will be just as stuck as I was and then I can get that info to you. So, for about a week, the Squid project is on hold.

I'll touch base again then.