Doctrine Common
  1. Doctrine Common
  2. DCOM-16

Doctrine\Cache\Cache\AbstractCache::deleteByPrefix() vs. cache namespace

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-BETA2, 2.0.0-BETA3, 2.0.0-BETA4
    • Fix Version/s: None
    • Component/s: Caching
    • Labels:
      None
    • Environment:
      PHP 5.3.0 + memcache + xdebug; FreeBSD 6.4-RELEASE-p

      Description

      The methods deleteByPrefix() / deleteByRegExp() / deleteBySuffix() are based on the method getIds(), which returns unique identifiers with an added namespace in the front. That is why to be able to delete cells using these three methods, you have to know the namespace.
      Example:

      $cacheDriver->setNamespace('ns');
      $cacheDriver->save('data', 'name');
      $cacheDriver->deleteByPrefix('data');

      In this example the cell will not be deleted.

        Activity

        Hide
        Guilherme Blanco added a comment -

        In commit: http://github.com/doctrine/common/commit/a2238b871c13cf0e195fa18f0b8744e38baabf48
        I committed a fix to this issue.

        Thanks for reporting that!

        Show
        Guilherme Blanco added a comment - In commit: http://github.com/doctrine/common/commit/a2238b871c13cf0e195fa18f0b8744e38baabf48 I committed a fix to this issue. Thanks for reporting that!

          People

          • Assignee:
            Roman S. Borschel
            Reporter:
            xlite
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: