# Best best caching http proxy for very specific use?

## Sadako

I want to set up a caching http proxy on my laptop which is functioning as a router, but I have some rather specific requirements;

The system is essentially diskless, it boots a kernel from a livecd with a tiny busybox-based initrd built in, which is used to fetch a tarball over the lan, unpack it on a tmpfs, and pivot_root into it.

The machine has 384MB of ram, currently only 55MB of that is used between the tmpfs and the loaded kernel+userspace, so I can only give the cache 250MB, maybe up to 300MB.

It'd only need to serve 3, maybe 4 different clients max, and I know 250MB is very small, but it should be enough to "accelerate" some things while letting me keep all firefox's caching disabled (I use graphical links for most of my browsing anyways, which has no on-disk cache).

I'd rather a daemon which can just operate without a filesystem for it's cache, just keep everything in memory within a strict limit, but using the tmpfs or a ramdisk is an option as long as the deamon can still delete old entries to clear space for new data (I know polipo in particular can't do this, it runs a script via cron every 24 hours to clear out old entries).

I'm going to play around with polipo anyway, see how well it does without a cache stored on a filesystem, but I was hoping someone here might have some insight on what might be the best tool for this particular job amongst the other options, such as squid, oops and whatever else is available?

----------

## Hu

Is it valid to assume that all clients using this caching proxy have been configured to do so?  If you want to have this automatically cache all HTTP traffic crossing the box, without configuring the clients, that will restrict your choices to proxies that understand transparent mode.

----------

## Sadako

 *Hu wrote:*   

> Is it valid to assume that all clients using this caching proxy have been configured to do so?  If you want to have this automatically cache all HTTP traffic crossing the box, without configuring the clients, that will restrict your choices to proxies that understand transparent mode.

 Yeah, all clients will be configured properly, no need for transparent proxying.

Also, it'll be behind privoxy, ie client -> http caching proxy -> privoxy -> WAN

Didn't mention before as it's probably not relevant, but I suppose it's better to risk giving irrelevant info rather than omitting important details...

----------

## Rexilion

Squid is perfect for this, you can finetune almost every caching parameter you can think of. But as I remember it, it is a little big...

----------

## Sadako

 *Rexilion wrote:*   

> Squid is perfect for this, you can finetune almost every caching parameter you can think of. But as I remember it, it is a little big...

 Yeah, Ive just been playing around with it, and it is a little big for this usage, especially some of it's dependencies.

I may try messing with it's configure switches, see how much lighter I can make it, but in the meantime I gave polipo a closer look and it appears to work quite well without a disk cache, and with very little overhead, so I'll probably go with that.

Thanks or the reply though.

----------

