CHI-Driver-Redis-SortedSet

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

        );

DESCRIPTION

    Extends CHI::Driver::Redis to address memory leak issues from an
    unbound set holding the namespace members. This module implements the
    fix as suggested in a feature request by Pieter Noordhuis as outlined
    here <https://github.com/antirez/redis/issues/135>.

    The expiration mechanism is implemented as a lazy cleanup,
    transparently invoked everytime store is called via CHI::set().

    Please note that this is not backwards compatible with existing Redis
    datasets that have already been populated with entries via the
    CHI::Driver::Redis module due to the underlying change in the data type
    holding the list of all keys in the namespace as retrieved thru
    CHI::get_keys().

FAQ

  I'm starting fresh with a new Redis database. What should I do?

README  view on Meta::CPAN


  I've been using CHI::Driver::Redis. How do I migrate to this new module?

    The FLUSHDB <http://redis.io/commands/FLUSHDB> command should first be
    issued. Please note that this will drop all existing keys and cached
    data and so is a destructive procedure.

  Why not make the driver backwards compatible with CHI::Driver::Redis?

    Yes, that's very much possible. And should likewise not be too costly
    as it will only have to involve a one-time transparently-invoked
    migration to migrate all previously-defined namespace members from the
    original set to a sorted set, with expiration values set from each
    key's TTL <http://redis.io/commands/TTL>.

    However, it would be prudent that the memory leak is an actual issue
    being experienced by the developer before using this module. At this
    point, the developer should first be aware of the subtle changes which
    will happen under the hood.

    As such, the author has made a judgment call to make this a conscious

lib/CHI/Driver/Redis/SortedSet.pm  view on Meta::CPAN

        debug     => 0
    );

=head1 DESCRIPTION

Extends L<CHI::Driver::Redis> to address memory leak issues from an unbound
C<set> holding the namespace members. This module implements the fix as
suggested in a feature request by Pieter Noordhuis as outlined
L<here|https://github.com/antirez/redis/issues/135>.

The expiration mechanism is implemented as a lazy cleanup, transparently
invoked everytime C<store> is called via C<CHI::set()>.

Please note that this is B<not> backwards compatible with existing Redis
datasets that have already been populated with entries via the
L<CHI::Driver::Redis> module due to the underlying change in the data type
holding the list of all keys in the namespace as retrieved thru
C<CHI::get_keys()>.

=head1 FAQ

lib/CHI/Driver/Redis/SortedSet.pm  view on Meta::CPAN


=head3 I've been using L<CHI::Driver::Redis>. How do I migrate to this new module?

The L<FLUSHDB|http://redis.io/commands/FLUSHDB> command should first be
issued. Please note that this will drop all existing keys and cached data
and so is a destructive procedure.

=head3 Why not make the driver backwards compatible with L<CHI::Driver::Redis>?

Yes, that's very much possible. And should likewise not be too costly as
it will only have to involve a one-time transparently-invoked migration to
migrate all previously-defined namespace members from the original C<set>
to a C<sorted set>, with expiration values set from each key's
L<TTL|http://redis.io/commands/TTL>.

However, it would be prudent that the memory leak is an actual issue being
experienced by the developer before using this module. At this point, the
developer should first be aware of the subtle changes which will happen
under the hood.

As such, the author has made a judgment call to make this a conscious



( run in 0.344 second using v1.01-cache-2.11-cpan-a1d94b6210f )