Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cache configuration factories for all available cache drivers in Doctrine Cache #2

Open
armetiz opened this issue Apr 17, 2014 · 1 comment

Comments

@armetiz
Copy link
Member

armetiz commented Apr 17, 2014

  • MemcacheCache
  • FileCache
  • RedisCache
@ghost
Copy link

ghost commented May 2, 2014

In fact, this is not quite enough - you should be able to add any cache implementing the Doctrine Cache interface.

Unfortunately, this is not possible because of how the CacheFactory configuration works by pulling tagged services in the DI Extension instead of a proper Compiler Pass, where it would respect tagged services from other bundles. This is done in order to get the configuration from the factories early on in the process, but kind of defeats the purpose of both the Cache interface and of container extensibility by using tags.

Allowing CacheFactories to add their own config like it is done in the SecurityBundle's addSecurityListenerFactory() might be cleaner and more flexible.

Alternative quick fix: Adding a "service" CacheFactory that allows specifying a custom service id implementing the Doctrine Cache interface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant