caching responses on disk; subsequent requests to cached resources made faster; example code?

106 views
Skip to first unread message

David Gleeson

unread,
Mar 18, 2016, 12:20:46 AM3/18/16
to LittleProxy
Hello LittleProxy people-

I have some chatty puppet deployment scripts running on a virtual-box vm which take ages because the Internet resources they download are slow. I can configure a proxy in the guest os linux (Centos) thru the environment variable http_proxy and https_proxy. I've pointed this at an instance of LittleProxy running on my host pc.

Is there an easy way to use LittleProxy to cache requests from a repository on disk? Or would I have to write code? Is there an example?

Thanks in advance

-DG

Frank Ganske

unread,
Mar 18, 2016, 2:05:20 AM3/18/16
to littl...@googlegroups.com
Hello David,

you have to write code to solve this with LittleProxy. It's possible of
course. But, I'm pretty sure there are existing solutions like Debian
apt cache or mirroring.

Doing yourself you need a store concept to convert URLs to file/folder
names. Consider to have a look at https://ganskef.github.io/MoCuishle/.
It's focus is to store *little* files. HTTP chunks are aggregated to
enable content modification in html so it have to fit in memory. You
have to append the received chunks to your cached files. I've done this
before.

Using Centos you could try Andrew M. Bishop’s WWWOFFLE, an offline proxy
implemented in C. This should solve your requirements.
http://www.gedanken.org.uk/software/wwwoffle/


Regards Frank
> --
> You received this message because you are subscribed to the Google
> Groups "LittleProxy" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to littleproxy...@googlegroups.com
> <mailto:littleproxy...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages