mazedigital / association_output

Association Output for Symphony: Inline XML
MIT License
5 stars 4 forks source link

Add Post Execute Delegate #12

Closed jonmifsud closed 9 years ago

jonmifsud commented 9 years ago

Add postExecute delegate, as the cacheable datasource works primarily with DatasourcePreExecute at which point it generates the datasource. Association output only appends the data within DatasourcePostExecute running a delegate to check for a difference in XML output is highly inefficient, it's better to have Association Output trigger a delegate when it actually adds data to a datasource.

Also added check for addedAssociationOutput datasource param prior to adding any association data. This is used as a flag to confirm if the data is/has been generated. If the XML is a string, it does not mean that the output is cached, or vice versa, an extension might load the cache and serve an object anyway, so some kind of flag is required. I'm aware my suggestion might not be the best but not sure what would be most suitable.

nitriques commented 9 years ago

LGTM, but I'll let @nilshoerrmann merge it since he's the expert with associations.

nilshoerrmann commented 9 years ago

Feel free to merge it, if it's looking good to you, Nicolas.

nitriques commented 9 years ago

@jonmifsud could you create a new version in the xml file since this will be merged directly into master please ?

jonmifsud commented 9 years ago

I thought I did bump the version in the XML. did I not?

On Wed, 26 Aug 2015 at 19:23 Nicolas Brassard notifications@github.com wrote:

@jonmifsud https://github.com/jonmifsud could you create a new version in the xml file since this will be merged directly into master please ?

— Reply to this email directly or view it on GitHub https://github.com/hananils/association_output/pull/12#issuecomment-135114272 .

nitriques commented 9 years ago

Sorry I must have not scrolled enough.