php - Symfony 2.5 prints cache header -


i using symfony 2.5. return view template page controller.

however, when render page, displays raw cache first part in <body> tag.

http/1.0 200 ok cache-control: no-cache date: thu, 26 jun 2014 06:07:05 gmt  [] 

i googled , found this answer (which similar problem) , this answer (which vaguely same).

so tried of following 1 one. nothing worked.

return $this->render('mybookbundle:section:splash.html.php' , $this->data); 

and

echo $this->renderview('mybookbundle:section:splash.html.php' , $this->data); return new response(); 

and

$displaypage =  $this->renderview('mybookbundle:section:splash.html.php' , $this->data); return new response( $displaypage ); 

and

$displaypage =  $this->render('mybookbundle:section:splash.html.php' , $this->data); return new response( $displaypage->getcontent() ); 

my webpage in simplest possible stage.

<!doctype html> <html xmlns="http://www.w3.org/1999/xhtml"> <head>     <meta http-equiv="x-ua-compatible" content="ie=edge"/> </head> <body>     <div>hello world</div> </body> </html> 

still none of methods worked. can please guide me in right direction ?

well don't know if following right answer, worked me. hope helps newbie me out there.

in controller, making forward calls other controllers required data. in controllers (the once dynamically called), returning response object. causing problem. however, returned plain string, cache display problem disappeared.

ideally, have return response object controller's action methods. however, in case, worked without returning response object.

i new symfony2, tried google bit couldn't find difference or reason cause. if can enlighten great.

p.s. believe should change controllers, not serving page background work, services.


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -