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

Better cache mapping #97

Closed
guilhermeblanco opened this issue Aug 6, 2012 · 4 comments
Closed

Better cache mapping #97

guilhermeblanco opened this issue Aug 6, 2012 · 4 comments
Labels

Comments

@guilhermeblanco
Copy link
Member

Currently, if you use a non-default cache support, like Redis, you're forced to map 3 instances for a single entity manager.
To simplify this support, and also make #65 and also remove the need of http://knpbundles.com/search?q=cache, we could use the 2.2 CacheBundle support ( symfony/symfony#3225 ) or simplify this by allowing our own cache:

doctrine:
    cache:
        apc: ~
    orm:
        // ...
        metadata_cache_driver: apc

This would also allow people to retrieve the cache drivers from service container.

@stof
Copy link
Member

stof commented Aug 6, 2012

When I thought about this a while ago, @beberlei said that using separate cache instances for the different doctrine caches was a better idea. Implementing it would push people to go the other way by using the same cache for the metadata, the queries and the results

@guilhermeblanco
Copy link
Member Author

@stof not really.
If you have a cluster, you may want to have a single connection.

Bu this does not prohibit people from having one per type. It'd just be a matter of implementing different cache connection (where I named the example as "apc").

So, this approach allows both, while the current support only allows multiple connections.

@intel352
Copy link

intel352 commented Mar 9, 2013

Not sure how much has changed since the last comment, but one of the cache definitions allows you to specify it's type as "service" and the id of the service. So if you reference the same service 3 times, doesn't that allow the same cache connection for each cache type?

@kimhemsoe
Copy link
Member

Closing as not relevant anymore.

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

No branches or pull requests

4 participants