HTTP caching (by )

Yesterday I configured Squid on my internal network; machines on the office LAN can use it if configured to use an HTTP proxy, while machines on the wifi LAN are forced to use it as a transparent proxy via port forwarding on the router (I'm slowly making the wifi LAN more and more like a cheap ISP's network - it's an open wifi, so I'm keen to force its users to be well-behaved).

The thing is, watching Squid's logs, I was horrified at just how few pages it felt it could cache. I'd always imagined, when developing Web apps, that anything fetched with GET could be cached for a while (and might even be prefetched). So when I actually dug a little deeper, I found that just about anything dynamically generated (including quite static pages that just use a bit of PHP to automatically include the same navigation in every page, with the currently selected option highlighted, for example) is, unless the script author has made special effort, generally not cacheable.

You can check the cacheability of pages with this useful cacheability testing tool.

Blog software is terrible at this, for example, despite generally having very cacheable pages

Rather than explain the rules in detail here, I'll link to somebody who already has. In particular, read the section on writing cache-aware scripts.

Read more »

Pesto (by )

I like Pesto sauce with pasta, and so does Sarah - as long as it's freshly made pesto, as encountered in restaurants. I'll tolerate pesto sauce from a jar, which she won't, but I still vastly prefer the fresh stuff.

One day I'll set up the resources needed to make it, but in the meantime, today we found a way of reviving jar pesto... we were having gnocci with sun-dried tomato pesto, but were both craving garlic, so I decided to liven the pesto up by pouring a bit of oil into a pan and frying a crushed garlic clove, then adding the pesto, then the gnocci.

The result was YUMMY. Not in the way that freshly made pesto is, but in a different way; the garlic somehow took the bitter edge off of the pesto's taste, and made it lovely instead.

I plan to experiment with doing this to other types of pesto and seeing what the result's like - but I'd still like to make my own fresh pesto sauce one day.

Kitten Presant (by )

I was outside yesturday evening when the kittens came trotting over and placed this at my feet.

Cat presant

I am both happy that they consider me worthy of their presants but at the same time feel sad for the poor little rodent. Still it means they are definatly good mousers now - even though that isnt a mouse!

Opps! (by )

I think I have lost or gained a week or something and mixed up the back dating of some posts - so I would ignore the chronoligy of the blog for a while if I were you!

Plus I want to post more stuff that I've written ages ago but havent got round to posting!

Another Hectic Week (by )

Yep another one!

This week Jean had a bit of a stomache bug resulting in me getting covered in puke at three in the morning. Lack of sleep then led me to get us to an appointment that happens to be in Febuary!

Then Wednesday was the Beavers, and a training course we managed to be over an hour late for :(. Thursday saw the Cubs and Scouts doing archery and Friday a client turned up unexpectadly. Saturday ended up being a business day what with said client being about but we also had to go the tip to drop of the dishwasher as we didnt want to drive all the way to Petersfield with it in the back the next day!

It was supposed to be the Swimming stage one badge for all three sections but some one was ill in the pool so it was canceled and we had to phone everyone! We also had to do a panicked arranging of the football team for the Sunday as we werent going to be there - though we still do not know how that went!

Sunday saw us visiting family 3 hrs away in Petersfield which was great fun 🙂 Baby Jean was much appricieated by Harry and Annabelle - I have a few pics but am currently too tired to upload them so you'll have to wait for the cuteness I'm afraid!

WordPress Themes

Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales
Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales