> From: "Dave Hodson" <[EMAIL PROTECTED]>
> Date: 2000-01-11 09:12:32 -0500

> I'm trying to implement IPC::ShareLite on a Red Hat Linux box. I've
> successfully stored/fetched the data I want between proc's, and am now
> attempting to "clean up" once the httpd is killed/restarted.
>
> Anyone has a good suggestion on how to do this? The POD for ShareLite
> doesn't address this topic.

I store a hash to share cached authentication information amongst the httpd  
children using ShareLite and when I want to clean it up I just run a perl  
script that uses the same key as the mod_perl modules that create and access  
the stored hash and store an empty hash wiping out what was there, something  
like:

#!/usr/local/bin/perl -w
use strict;
use IPC::ShareLite;
use Storable qw(freeze);

my $share_ip = IPC::ShareLite->new(-key => 'aaaa', -create => 'no', -mode => 0666);
$share_ip->store(freeze ({}));

Cheers,
Mark

Reply via email to