in reply to When does XML get to be too much?

Cache::FileCache can make this easy.

# from a CGI script which times users out after an interval require Cache::FileCache; my $cache = new Cache::FileCache({ default_expires_in => '60 minutes', auto_purge_interval => '4 hours', auto_purge_on_set => 1, filemode => 0077, namespace => 'cookies', username => 'www', }) or die "cookie_cache\n"; my $user = $cache->get($browser); # logged-in user or undef if ( defined $user and defined $q->param('_logout') ) { $q->delete('_logout'); $cache->remove($browser); # clear cache print($q->p("You are no longer logged in as $user.")); undef $user; } elsif ( not defined $user and defined (my $try_user = $q->param('_us +er')) ) { $q->delete('_user'); my $try_password = $q->param('_password'); $q->delete('_password'); if ( $try_user =~ /^[a-z]{1,8}$/ and verify($try_user,$try_pas +sword) ) { $user = $try_user; print($q->p("Welcome back $user.")); } else { print($q->p("I'm sorry, that's not right.")); } } if (defined $user) { $cache->set($browser,$user); # reset the timeout # do a logout form } else { # do a login form } ...

to limit the program to running at most once per minute, try and get your entry, if you can it's been less than a minute so notify user and exit, if you can't get your entyr it's been more than a minute so do your stuff and set a new entry. you can do the same for each user and give them 1 run a minute or less than 5 runs per 20 minutes without too much work.