[Catalyst] FileCache and PageCache for same app on different ports

Richard Jolly Richard.Jolly at bbc.co.uk
Wed Jan 4 15:16:20 CET 2006


We have multiple developers running the same application on different

Since they share the same cache (FileCache defaults to /tmp/FileCache),
and the port isn't part of the cache key
(&PageCache::_get_page_cache_key), we are getting cached pages served

Ideally I'd like to specify the port as part of the cache storage

  package MyApp;

  use Catalyst qw/Cache::FileCache PageCache/;

  # make sure caches for apps running on different ports do not conflict
  __PACKAGE__->config->{cache}->{storage} = "tmp/FileCache/$PORT";

Is this the right way to do it? 

And how can I get the port variable here? Its passed down to
Catalyst::Engine::*, but I don't see any accessors.


Richard Jolly

More information about the Catalyst mailing list