The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Daemonise::Plugin::KyotoTycoon - Daemonise KyotoTycoon plugin

VERSION

version 2.13

SYNOPSIS

This plugin conflicts with other plugins that provide caching, like the Redis plugin.

    use Daemonise;
    
    my $d = Daemonise->new();
    $d->debug(1);
    $d->foreground(1) if $d->debug;
    $d->config_file('/path/to/some.conf');
    
    $d->load_plugin('KyotoTycoon');
    
    $d->configure;
    
    # get a key
    my $value = $d->tycoon->get("some_key");
    
    # set a key and expire (see Cache::KyotoTycoon module for more)
    $d->tycoon->set("key", "value", 600);
    
    # allow only one instance of this deamon to run at a time
    $d->lock;
    
    # when you are done with mission critical single task stuff
    $d->unlock;

ATTRIBUTES

tycoon_host

tycoon_port

tycoon_db

tycoon_connect_timeout

cache_sync_delay

cache_default_expire

tycoon

mp

MessagePack object

SUBROUTINES/METHODS provided

configure

cache_get

retrieve, base64 decode and thaw complex data from KyotoTycoon

cache_set

freeze, base64 encode and store complex data in KyotoTycoon

cache_del

delete KyotoTycoon key

lock

_extend_lock

extends the lock set by the same process

This function returns 1 on success

unlock

stop

AUTHOR

Lenz Gschwendtner <norbu09@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2013 by Lenz Gschwendtner.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.