Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    Apache::SharedMem 0.09

    Download button

    No screenshots available
    Downloads: 402  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    Good (3.4/5)
    7 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Olivier Poitrey | More programs
    Perl Artistic License / FREE
    February 8th, 2008, 16:04 GMT [view history]
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Apache::SharedMem description

    Allows you to share data between Apache children processes through the shared memory.

    Apache::SharedMem allows you to share data between Apache children processes through the shared memory.

    SYNOPSIS

    use Apache::SharedMem qw(:lock :status);

    my $share = new Apache::SharedMem || die($Apache::SharedMem::ERROR);

    $share->set(key => 'some data');

    # ...maybe in another apache child
    my $var = $share->get(key);

    $share->delete(key);

    # delete all keys if the total size is larger than $max_size
    $share->clear if($share->size > $max_size);

    # using an exclusive blocking lock, but with a timeout
    my $lock_timeout = 40; # seconds
    if($share->lock(LOCK_EX, $lock_timeout))
    {
    my $data =...
    ...some traitement...

    $share->set(key => $data); # the implicite lock is not overrided
    warn('failed to store data in shared memory') if($share->status & FAILURE);

    $share->unlock;
    }

    $share->release;


    This module make it easier to share data between Apache children processes through shared memory. This module internal functionment is much inspired from IPC::SharedCache, but without any cache management.

    The share memory segment key is automatically deduced by the caller package, which means that 2 modules can use same keys without being concerned about namespace clash.

    An additionnal namespace is used per application, which means that the same module, with the same namespace used in two applications doesn't clash too. Application distinction is made on two things : the process' UID and DOCUMENT_ROOT (for http applications) or current working directory.

    Product's homepage

    Requirements:

    · Perl

    What's New in This Release: [ read full changelog ]

    · Major bugfix that made the module unusable under mod_perl

      


    TAGS:

    share data | Apache processes | Perl module | Apache | processes | shared

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM