Skip to content

Flush cache manager at command termination (fix #32) #38

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

Merged
merged 2 commits into from
Mar 15, 2014

Conversation

ddeboer
Copy link
Member

@ddeboer ddeboer commented Mar 8, 2014

No description provided.

*/
public function onConsoleTerminate(ConsoleTerminateEvent $event)
{
$this->cacheManager->flush();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i was wondering if we could return the number of requests we flushed in the CacheManager and use that to output a line on the console "Sent 5 invalidation requests to the caching proxy." - for the verbose mode.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be done, with some changes in the library. And there’s some ambiguity: does “5 requests” mean: 5 requests to each proxy server, or 5 requests in total?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would mean to each proxy. making this more explicit makes sense yes. btw, i would only ouptut a message when there are > 0 requests, as otherwise we would output that line after every command run.

and yes, we would need to change on the library, but i think it would make sense. shall i do a PR on the library?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, please!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dbu
Copy link
Contributor

dbu commented Mar 9, 2014

thanks. made some minor comments. the only important thing is the question how we behave in error situations.

*
* @param GetResponseForExceptionEvent $event
*/
public function onKernelException(GetResponseForExceptionEvent $event)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

given that you don't use the event, the argument is useless (and so you could have a single method)

@dbu
Copy link
Contributor

dbu commented Mar 11, 2014

what about the terminate/exception situation and stofs input to reduce the number of methods?

@ddeboer
Copy link
Member Author

ddeboer commented Mar 12, 2014

Think the terminate/exception has been cleared up as far as possible. I separated the console event methods because we want to log in those cases.

@dbu
Copy link
Contributor

dbu commented Mar 14, 2014

cool, looks good to me. please merge and squash.

ddeboer added 2 commits March 15, 2014 11:38
Flush cache manager on kernel and command exception, too

Revert minimum-stability to dev

Reduce number of terminate methods
ddeboer added a commit that referenced this pull request Mar 15, 2014
Flush cache manager at command termination (fix #32)
@ddeboer ddeboer merged commit 8e1ba5f into master Mar 15, 2014
@ddeboer ddeboer deleted the console-terminate branch March 15, 2014 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants