Doctrine Common
  1. Doctrine Common
  2. DCOM-57

Doctrine\Common\Cache\AbstractCache::deleteAll() does not take the namespace into account

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.1.2
    • Component/s: Caching
    • Labels:
      None
    • Environment:
      Memcached

      Description

      The deleteAll() function delete all keys with no respect of the namespace.

      Using orm:clear-cache:metadata with memcache result in the deletion of all memcache keys. (including keys unrelated to the orm)

        Activity

        Hide
        Eric Durand-Tremblay added a comment - - edited

        See pull request : https://github.com/doctrine/common/pull/46

        I think the best way to fix this problem is to check for the namespace in the getIds() function.

        Unfortunately, that would break the interface of AbstractCache

        Split the function in getIds() and abstract _getIds(). Do the namespace check in getIds()

        I can do pull request on github if necessary.

        NOTE
        I checked on master branch and the probleme is not fixed by commit
        786deeae264ae03061d6aa92c681afa4344f18b9 : Fixed AbstractCache where delete* functions were incorrectly being prepended by namespace if any is defined. This was causing a double p

        Show
        Eric Durand-Tremblay added a comment - - edited See pull request : https://github.com/doctrine/common/pull/46 I think the best way to fix this problem is to check for the namespace in the getIds() function. Unfortunately, that would break the interface of AbstractCache Split the function in getIds() and abstract _getIds(). Do the namespace check in getIds() I can do pull request on github if necessary. NOTE I checked on master branch and the probleme is not fixed by commit 786deeae264ae03061d6aa92c681afa4344f18b9 : Fixed AbstractCache where delete* functions were incorrectly being prepended by namespace if any is defined. This was causing a double p
        Hide
        Guilherme Blanco added a comment -
        Show
        Guilherme Blanco added a comment - Fixed in master since this commit: https://github.com/doctrine/common/commit/486169851ea87b3e14ed45d5bfd7d07b1d41af65
        Hide
        Benjamin Eberlei added a comment -

        Merged into 2.1.x for next release

        Show
        Benjamin Eberlei added a comment - Merged into 2.1.x for next release

          People

          • Assignee:
            Guilherme Blanco
            Reporter:
            Eric Durand-Tremblay
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: