Hacking in support for dbal result cache #165

wants to merge 1 commit into


None yet

3 participants


Refs #114

This is hacked-in support. Some of the code may be usable, but really this shows that some refactoring is needed so that cache support isn't limited to ORM only.

Please do not merge in this code, just submitting it so that others can see where modifications are needed and run with it. I pretty much have no clue re: the XSD changes, but I didn't get any errors out of Symfony2 or PHPStorm with my changes. Regardless, even the XSD changes need refactoring, as the cache type definitions should be moved into a reusable location in the schema imho (so that it's accessible by both dbal and orm namespaces).

Also, this has only been tested with Service type cache instance. I don't have the time to attempt this proper.

@stof stof commented on the diff Mar 13, 2013
@@ -54,7 +59,7 @@
<xsd:attribute name="default-connection" type="xsd:string" />
- <xsd:attributeGroup ref="connection-config" />
+ <xsd:attribute name="connection-config" type="connection-config" />
stof Mar 13, 2013 Member

This is wrong. You cannot have an attribute being a complexType.

stof commented Mar 13, 2013

btw, there is issues with your changes in the XSD. See the testsuite failures.


I expect there are numerous flaws in this PR, as it's a cheap hack to the PHP lib, with a failed attempt to update the xsd (without real understanding on my part regarding valid XSD schema). I'd never suggest anyone ever use this code either, except to perhaps see possible entry points for refactoring to support DBAL cache :-)

Hopefully someone else will get inspired, as I'm slammed with a late deadline for the next several weeks :-\

@beberlei beberlei closed this May 4, 2013
beberlei commented May 4, 2013

You can add this kind of code with a compiler pass if you need it for your application.

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