Review main Merged

36430[BUGFIX] Memcached backend identifierPrefix only based on PATH_site

Arjen Hoekema CR +2 V +2 Easy +2 −1 updated 02/06/15, 19:14

Commit message

Change the 'identifierPrefix' in the MemcachedBackend so it is
caculated based on:
* PATH_site
* Context (production/developement)
* Cache identifier (cache_pages, cache_hash)

This avoids cache collisions when using a single Memcached backend
for multiple caching configurations when using the same
'entryIdentifier' in set()

Review

  • Code review CR +2
    • Christian Kuhn +2
    • Helmut Hummel +1
  • Verified V +2
    • Christian Kuhn +2
    • Helmut Hummel +1

Issues 1

Files 1

Review log 14

  1. Arjen Hoekema uploaded patch set 1 01/30/15, 14:16

  2. Christian Kuhn updated the commit message in patch set 2 01/30/15, 14:24

  3. Christian Kuhn commented on patch set 2 CR +1 01/30/15, 14:25

    Sounds good on reading.
  4. Christian Kuhn commented on patch set 2 02/05/15, 23:33

    ping. anyone wants to give this one a shot? should be relatively straight ...
  5. Christian Kuhn voted on patch set 2 V +1 02/05/15, 23:46

  6. Helmut Hummel commented on patch set 2 CR -1 02/06/15, 08:50

    MemcachedBackend.php:165

    why are you reducing the hash length? this very likely leads to collisions we used the full md5 hash before, why can't we continue using it?
  7. Helmut Hummel commented on patch set 2 02/06/15, 08:51

    other than reducing the hash length, this is a pretty obvious change
  8. Arjen Hoekema commented on patch set 2 02/06/15, 15:02

    Copied this (the length) from FLOW, the number of possible combinations are not that high unless you would have a high number of TYPO3 installs with several caching backends connecting to a single Memcached server. Making the identifier prefix shorter leaves more room for identifiers of the cache entries (max key length is 250).
  9. Christian Kuhn commented on patch set 2 02/06/15, 18:34

    yeah, hitting a collision in this case is extremely unlikely.
  10. Helmut Hummel commented on patch set 2 CR +1 02/06/15, 19:04

    OK, convinced :) This hash is not per entry but per TYPO3 Installation on same memcache server.
  11. Helmut Hummel commented on patch set 2 V +1 02/06/15, 19:13

    tests seem to work ;)
  12. Christian Kuhn voted on patch set 2 CR +2 V +2 02/06/15, 19:13

  13. Christian Kuhn commented on patch set 2 02/06/15, 19:14

    Cherry Picked This patchset was cherry picked to branch TYPO3_6-2 as commit 068339ce5247e1717f3e2accc03b58015f36909c
  14. Christian Kuhn merged patch set 2 02/06/15, 19:14