The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

    Mcache - program cache (DB).

SYNOPSIS

    use Mcache;

    my $cache = mcache->new();

    $cache->add("Foo Bar 1",1);
    my $key = $cache->add("Foo Bar 2",1);

    my $sel = $cache->get(1);
    print "{".$sel."}\n";

    $cache->del(1,$k);

    $sel = $cache->get(1);
    print "{".$sel."}\n";

DESCRIPTION

    Mcache - program cache (DB) for storing in the memory pages 
    with editable set of fields. Issuance result holds in the JSON 
    

EXPORT

    new();

    get(id); # return full data page (all fields) in JSON

    get(id,key); # return a single field with a key

    add(field,id); # add fields on data page id and return unique key

    add(field,id,key); # add fields on data page id with key

    del(id,key); # delete fields

    update(field,id,key); # update fields

    count(id); # count fields on data page id
    
    id(id); # current id for update


    var:
            id - unique page number
            key - unique field number

AUTHOR

Maxim Motylkov, E: mmv@cpan.org

COPYRIGHT AND LICENSE

Copyright (C) 2011 by Maxim Motylkov

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.1 or, at your option, any later version of Perl 5 you may have available.