Skip to content

Loading…

DCOM-22: Cache should support an array of options. #526

Closed
doctrinebot opened this Issue · 3 comments

2 participants

@doctrinebot

Jira issue originally created by user @guilhermeblanco:

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.

@doctrinebot

Comment created by romanb:

After our discussion yesterday, can we close this?

@doctrinebot

Comment created by @guilhermeblanco:

As discussed, we won't fix this.

@doctrinebot

Issue was closed with resolution "Won't Fix"

@doctrinebot doctrinebot closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.