CHI-Driver-LMDB
view release on metacpan or search on metacpan
lib/CHI/Driver/LMDB.pm view on Meta::CPAN
up properly in L</single_txn>.
Also, this mode is less ideal if you want to have two processes sharing a cache,
because the data won't be visible on the other one till it exits! âº
=head2 C<NOSYNC> Mode.
You can also tell LMDB B<NOT> to call C<sync> at the end of every transaction,
and this will greatly improve write performance due to IO being greatly delayed.
This greatly weakens the databases consistency, but that seems like a respectable
compromise for a mere cache backend, where a missing record is a performance hit, not a loss of data.
use LMDB_File qw( MDB_NOSYNC MDB_NOMETASYNC );
...
my $cache = CHI->new(
...
flags => MDB_NOSYNC | MDB_NOMETASYNC
);
This for me cuts down an operation that takes 30 seconds worth of writes down to 6 âº.
( run in 0.577 second using v1.01-cache-2.11-cpan-65fba6d93b7 )