in reply to framework to handle timeouts/internal caching?
in thread Web app frameworks - I am totally confused!
I can only cache for about an hour to keep things fresh however. So I have to do a fair amount of work to accomplish that ...
Cache::Cache can help you here.
my $cache = new Cache::FileCache( ); my $result = $cache->get( "result" ); if ( not defined $result { $result = expensive_function(); $cache->set( "result", $result, "1 hour" ); }
|
|---|