$did ||= 1100; my $cache = new Cache::FileCache ( { namespace => 'mySpace', default_expires_in => '600', } ); my $data = $cache->get( $did ); warn "using data from cache! (PID: $$) " if DEBUG and $data; if ( ! $data ) { use Net::SSLeay qw(get_https post_https sslcat make_headers make_form); my $url = "*****"; $SIG{ALRM} = sub { return DECLINED; }; alarm(15); my ($page, $response, %reply_headers) = get_https($secureHost, 443, "$url"); alarm(0); ### process $page to get $data .... warn "setting cache now for $did (PID: $$) " if DEBUG; $cache->set( $did, $data, "600" ); }