Doctrine Common
  1. Doctrine Common
  2. DCOM-22

Cache should support an array of options.

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Caching
    • Labels:
      None

      Description

      Currently the overall code to instantiate Cache drivers cannot be generic.
      This can be noticed when you compare APCCache and MemcacheCache drivers.

      The first one is simply a no argument instantiation. The second, even after isntantiation, it still requires you to call a method (->setMemcache) in order to work.
      This is not optimal for generic approaches, creating unreliable conditional situations. Also it is not extendable, allowing user to build his own driver.

      Please consider these sample codes:
      http://pastie.org/1103439
      http://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/DoctrineBundle/DependencyInjection/DoctrineExtension.php#L419

      A suggested approach could be a CacheManager as a fatory.
      Another one would be Cache interface assigning a contract to receive an array of options.

      Anyway, this should be fixed VERY soon.

        Activity

        Hide
        Roman S. Borschel added a comment -

        After our discussion yesterday, can we close this?

        Show
        Roman S. Borschel added a comment - After our discussion yesterday, can we close this?
        Hide
        Guilherme Blanco added a comment -

        As discussed, we won't fix this.

        Show
        Guilherme Blanco added a comment - As discussed, we won't fix this.

          People

          • Assignee:
            Guilherme Blanco
            Reporter:
            Guilherme Blanco
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: