[Melbourne-pm] Apache Cache
mathew.robertson at netratings.com.au
Mon Jul 3 21:03:46 PDT 2006
>> why not use squid? I believe it does the memory -> disk -> original
>> or a CDN like akamai/Coral
>> also are you sure that serving the images out of memory is faster
>> than using sendfile and local disk? (or using a thin webserver to
>> serve them instead of involving mod-perl at all)
> I am speaking purely generically. i.e. We need a cache api for Apache
> (or is there one already?) so that you don't have to care about any
> of the above - as such - So tomorrow when I do a bit of code that
> caches database requests, and the next which rewrites HTML::Mason
> cache, and today when I do Thumnail - they are all the same cache.
> However your idea about squid is similar to the use of mod_cache in
> Apache. I have considered that, mod_cache does memory or file caching
> based on URI - which you just plug in front - excellent - but I have
> to yet confirm if it supports the ability to wipe a cache entry (I am
> assuming it has the ability to get headers and do it that way).
> The nice things about something like mod_cache is that you just
> enable it infront of anything in Apache - although if it is as simple
> as that, why is anyone doing any other caching?
It seems to me that people have forgotten "Caching 101"...
-> cache effectiveness largely depends on how far it is (logically
and physically) from where it is being used.
ie: it is not "as simple as that"...
eg: memcache'ing of application objects (say a web page) is fine
when your app needs to generate those objects from a database which
happens to live out over a network. If the database was sitting on
the same machine as the application, you would definitely need to
profile to determine whether caching was worth it.
Likewise, caching of urls is grand, provided that no POST data is
Also, there is the matter of invalidating cache entries ("Caching
102"...? :-) - when can / should cache entries be invalidated?
As to the origonal problem -> we want thumbnails, thus caching was
suggested. Why caching? What is the problem that we are trying to
solve? To generate smaller images automatically?
More information about the Melbourne-pm