[Melbourne-pm] Apache Cache

Scott Penrose scottp at dd.com.au
Mon Jul 3 20:46:15 PDT 2006

On 04/07/2006, at 13:17, Daniel Pittman wrote:
> Scott Penrose <scottp at dd.com.au> writes:
>> On 04/07/2006, at 12:34, Ian Holsman wrote:
> G'day Scott.
> [...]
>> Anyway, my point is NOT to tie into one solution. The File Cache
>> method most cpan apache gallery type code uses is bad, but forcing
>> memcached only would be worse - as we may be dealing with terabytes
>> of images. In some places though where performance is key and usage
>> is small, then memcached - and of course the possibility of both for
>> performance.
>> The point is that there should be an Apache module for caching which
>> does all this for me - the problem with the modules available is that
>> they do everything themselves - so lots of repetition, lack of
>> flexibility etc.
> I disagree with you here: Apache is the *wrong* place to put this
> functionality.  What happens if I want to use the same sort of cache
> with a FastCGI interface[1]...

Actually that was my fault in the way I wrote it.
I agree 100% that it should not be IN apache.

This is true recently for modules too - I would like to write a  
thumbnail module that can be used in Apache or in Catalyst or ...

What I meant about Apache above is more that Apache already has a  
heap of built in cache stuff - shared memory and more, so in a way we  
should do the reverse - i.e. have a Cache::Cache module that can use  
the Apache stuff.

> That is a much better solution.  An Apache specific backend may make
> sense in some cases, but not for most.

:-) yep, as above.

I like the idea of having one cache system. I HATE the fact that CPAN  
has two that are not name spaced.
If one was called Cache::API and the drivers were Cache::API::* and  
the other was Cache::Cache and the drivers were Cache::Cache::* that  
would be fine - but they are not, they are a complete and utter  
mess ! I will send a mail about that soon. Paul and I were discussion  
this a few weeks ago - about getting them sorted out a bit, and  
writing a memcached, sql cache and a few others.

>> I wonder if a cascaded Cache::Cache system could be implemented -
>> e.g. Memory -> Disk -> Original - so you have a way of caching the
>> most popular disk entries in memory (by memory that can of course be
>> Memcached) :-)
> Not that I have run across.  Cache::Squid - I see a great need. ;)

Yes good plan.

I think it would be dedicated driver - something like  
"Cache::MemoryDiskCache" or as above "Cache::SquidCache"

This conversation has been excellent, I think it has solidified in my  
mind that using an api such as Cache::Cache and letting that use  
Apache is the correct approach, rather than the other way around. But  
it has also alerted me again to the fact that we need to clean up the  
Cache APIs.

Ta heaps guys


More information about the Melbourne-pm mailing list