Review main Abandoned

27620[WIP] Add locking for caches

Helmut Hummel CR 0 V 0 Hard +319 −146 updated 04/14/14, 12:25

Commit message

Adds locking to ensure that two parallel request
do not write to the cache at the same time.

A callback system is used, so ensure that a cache miss
is followed by a cache set, atomically to avoid race conditions.

Open points:
* Not yet PHP 5.3 compatible
* Not backwards compatible due to protected ->set()
* Many, many, replacements missing

Possible variation could be to allow locking and unlocking from
outside the cache, so we don't need to modify the set/get calls.
This might still lead to race conditions, if only one call
does not properly lock/unlock.

Especially unlocking in error cases must not be forgotten.

Review

  • Code review CR 0

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V 0

    Imported before Forger kept the single votes, the next import adds them.

Files 17