[Catalyst] Cannot create a cache

Matt S Trout dbix-class at trout.me.uk
Sat Nov 18 07:21:57 GMT 2006


Ian Docherty wrote:
> Perrin Harkins wrote:
>> Ian Docherty wrote:
>>> I have a hash which is acting as my cache but even if I put values 
>>> into it, on the next request the hash is empty.
>>
>> Are you aware that apache runs multiple processes and that each 
>> process has a different copy of your %cache variable?  You will not 
>> get the same process each time.  If you want to share between 
>> processes, you need something like Cache::FastMmap.
>>
>> - Perrin
> Perrin
> Excellent. Thanks for pointing that out to me. Yes I should have thought 
> of that point but it was eluding me. I just *knew* that it was something 
> pretty fundamental!

/me points at Catalyst::Plugin::Cache on CPAN

-- 
      Matt S Trout       Offering custom development, consultancy and support
   Technical Director    contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +



More information about the Catalyst mailing list