简体   繁体   中英

Changes made in an zend application are not reflected immediately

I am a newbie with zend-framework and I am building a small application.. Everything was working fine till yesterday... Suddenly today I found that the changes made were not reflecting at all.. so I restarted the machine and found that the changes done were now reflecting ... But again the same thing ... Is there some kind of cache that i need to clear ? Any help, any directions are appreciated ... surely i can't restart the machine after every change...

Sample code: Controller:

public function indexAction()
{    
     $this->info="Please login here";
     //$this->view->form = new Application_Form_LoginForm();
     //$this->getForm();
     $this->view->form = $this->getForm();
}

View:

<?php 
  echo $this->info;

In order to test this, I am just changing the value of $this->info

I finally figured this one out. This looked like a browser caching issue; the browser was caching the page and hence any changes were not visible.

After Patrick confirmed that there is no in-built default caching, I started looking for external factors. First stopped my apache and found that browser was still showing the page. Finally, I tried on Google Chrome and it was working as normal. So, I cleared my browser cache and it was working as normal.

Thanks to all of you and StackOverflow.

Your machine will most likely be using APC which has APC stat set to 1.

Setting it to 0 should fix this.

Zend Framework which is just a PHP library does not have any caching built in to your views, and this sources like a memory caching problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM