Working with TYPO3 Flow you probably configured a cache for Doctrine in Production context. If you want to use APC you have to flush the cache manually because the APC Cache is not accessible from CLI.
So the challenge is to clear the APC Cache when the Flow Cache is flushed which could be achieved with only a few lines of code. This is not the cleanest way, so if you have a better solution feel free to add a comment.
One of the great concepts of Flow are Signals and Slots and there are a few Signals in the TYPO3.Flow Package which could be used in your Package. What you need is an ActionController which clears the APC Cache as this has to be done over http. The only thing you have to do is to wire the Flow Signal
finishedCompilationRun, when the Flow Cache is build, with your ActionController in the boot Method of your package’s Package Class. Invoking the ClearCacheAction using file_get_contents you have to configure the host in your Settings. Make sure to configure the host of your Development Context.
After that you’ll never have to think about flushing the APC Cache manually. Of cource you could add an encryption key or something else to avoid the APC Cache is flushed by invoking the ClearCacheAction directly.