TM::ResourceAble::MemCached
Topic Maps, Memcached server backend
- Provided by: libtm-perl (Version: 1.56-7)
- Report a bug
Topic Maps, Memcached server backend
use TM::ResourceAble::MemCached;
use Fcntl;
# create/reset new map
my $tm = new TM::ResourceAble::MemCached (
baseuri => 'http://whereever/',
servers => [ localhost:11211 ],
mode => O_TRUNC | O_CREAT,
);
# use TM interface
# open existing map
my $tm = new TM::ResourceAble::MemCached (
baseuri => 'http://whereever/',
servers => [ localhost:11211 ],
);
This package implements TM using a memcached server farm as backend. You should be able (without much testing, mind you, so it is EXPERIMENTAL) to perform all operations according to the TM interface.
NOTE: The implementation is using the TIE technique (perltie via Tie::StdHash), so maybe there are problems lurking.
Of course, a set of memcacheds can store any number of maps. To keep them separate, the baseuri is used, so make sure every map gets its own baseuri.
The constructor expects a hash with the following keys:
All other options are passed to the constructor chain of traits (TM::ResourceAble) and superclasses (TM).
TM, TM::ResourceAble
Copyright 2010, Robert Barta <drrho@cpan.org>, All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. http://www.perl.com/perl/misc/Artistic.html