caching without domains in the path

Okay, so I was reading the caching tutorial over on Rails Envy (which
is great, btw), but I'm having the same problem as someone in the
comments, and not sure how to move beyond it (a newbie to all this
back end stuff...)

I have action caching working on a model (in fact two of them);
however, the fragment is stored in two places:
/tmp/cache/domain.com/...
and
/tmp/cache/www.domain.com/...

so expiring them is a bit tricky.
from the same comments under the above mentioned tutorial, I
understand one solution might be to overwrite fragment_cache_key, and
yet without a little more guidance, my ruby is not up to the
challenge...any advice?

Thanks in advance.