• Resolved Relevad

    (@relevad)


    Hi,

    Found a couple more bugs and revised the code a bit more.

    Changed code here:
    http://pastebin.com/UbnU5ydb

    changelist:
    – reworked the delete() function – better flow
    – fixed bug in set() and add_or_replace() that prevented php internal cache from being updated unless redis was down or group was excluded.
    —- php internal cache should always be updated unless the redis update is tried and fails.
    – fixed bug in get() where object_cache could not tell the difference between keys with an empty “” and keys that did not exist.
    – Added helper function validate_expiration()
    – Added member variables to support mandatory expiration of redis keys.
    — force_nonzero_expiration (bool)
    — default_nonzero_expiration (int)

    It is entirely possible that the following functions are also not working correctly, but as they are never called from within wordpress core I did not make any attempt to debug them. (marked with TODO statements)
    – increment, decrement, get_multi

    https://ww.wp.xz.cn/plugins/redis-cache/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Relevad

    (@relevad)

    Bah, made a silly mistake.

    in function validate_expiration()
    change:
    $expiration = (is_array() || is_object() ? 0 : abs( intval( $expiration ) ) );
    to
    $expiration = (is_array($expiration) || is_object($expiration) ? 0 : abs( intval( $expiration ) ) );

    Plugin Author Till Krüss

    (@tillkruess)

    Hey!

    I just released version 1.1 which includes all your updates. Have a look.

    Cheers,
    Till

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘More fixes for cache and internal cache’ is closed to new replies.