Re: Caching Local vs. Server
I've read your post twice and if it's creating DB rows and the problem is only with refreshing of page contents it's probably because your browser did not checking the url after redirect but it reads from cache. add the $this->cachDisable(); in beforeFilter() action in your: - AppController (whole site) - PluginNameAppController - YourController The cacheDisable() action simply tells your browser not to cache generated HTML and re-download it each time. There are some good tips on CakePHP performance (debug:0, APC caching, better server, etc) and i dont't think that cacheDisable is the slow down factor. Hope it helps. On Jul 7, 6:32 pm, dtemes wrote: > I had some issues while deploying a site to a production server > becouse I also copied the cache files from the test server, if this is > the case for you you might try deleting the cache files from the app/ > tmp/cache folder and subfolders or set debug to 1 or 2 for a while in > the production server. > > On 7 jul, 18:20, echo419r wrote: > > > I am working on a staff site for my company where users must log in > > and submit reports. An admin must create each new user account before > > that user is able to log in to the site. > > > Everything seems to be working perfectly fine when testing on my local > > environment, but when I test it out on the live server, I seem to have > > some caching problem(s). Local: When I add a new user account, > > everything works as expected. > > Server: When I add a new user account, it takes me back to the index > > page but the new account doesn't appear. I have to do a hard refresh > > before the "$session->flash();" message and the new account appear. > > > My Setup > > I haven't changed anything with the core.php file except change the > > "debug" line > > Local: Configure::write('debug', 2); > > Server: Configure::write('debug', 0); > > > My Work-around > > For each page where this poses a problem, I have added "$this- > > > >disableCache();" to the function: > > > function index() { > > $this->disableCache(); > > . > > . > > .} > > > This seems to cause the new account/flash messages to appear the first > > time without having to do a hard refresh. But I've had to add this to > > almost every function on my site. And since this is disabling the > > cache for each of these pages, it causes the site to run very slowly. > > > I have read, re-read, and re-read every section on Caching there is on > > the CakePHP manual, but I can't seem to figure it out. I've done > > literally hundreds of Google searches trying to figure this out, but > > they only come up with instructions on how to add Caching to my site > > or redirect me back to the CakePHP manual. I'm not sure if my problems > > are being caused by CakePHP or my server. > > > I am using CakePHP version 1.2.7 > > I am using MAMP for my local testing > > My server is a Mac OS X Server 10.5.8 > > > Any assistance would be greatly appreciated. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Caching Local vs. Server
I had some issues while deploying a site to a production server becouse I also copied the cache files from the test server, if this is the case for you you might try deleting the cache files from the app/ tmp/cache folder and subfolders or set debug to 1 or 2 for a while in the production server. On 7 jul, 18:20, echo419r wrote: > I am working on a staff site for my company where users must log in > and submit reports. An admin must create each new user account before > that user is able to log in to the site. > > Everything seems to be working perfectly fine when testing on my local > environment, but when I test it out on the live server, I seem to have > some caching problem(s). Local: When I add a new user account, > everything works as expected. > Server: When I add a new user account, it takes me back to the index > page but the new account doesn't appear. I have to do a hard refresh > before the "$session->flash();" message and the new account appear. > > My Setup > I haven't changed anything with the core.php file except change the > "debug" line > Local: Configure::write('debug', 2); > Server: Configure::write('debug', 0); > > My Work-around > For each page where this poses a problem, I have added "$this- > > >disableCache();" to the function: > > function index() { > $this->disableCache(); > . > . > .} > > This seems to cause the new account/flash messages to appear the first > time without having to do a hard refresh. But I've had to add this to > almost every function on my site. And since this is disabling the > cache for each of these pages, it causes the site to run very slowly. > > I have read, re-read, and re-read every section on Caching there is on > the CakePHP manual, but I can't seem to figure it out. I've done > literally hundreds of Google searches trying to figure this out, but > they only come up with instructions on how to add Caching to my site > or redirect me back to the CakePHP manual. I'm not sure if my problems > are being caused by CakePHP or my server. > > I am using CakePHP version 1.2.7 > I am using MAMP for my local testing > My server is a Mac OS X Server 10.5.8 > > Any assistance would be greatly appreciated. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Caching Local vs. Server
I am working on a staff site for my company where users must log in and submit reports. An admin must create each new user account before that user is able to log in to the site. Everything seems to be working perfectly fine when testing on my local environment, but when I test it out on the live server, I seem to have some caching problem(s). Local: When I add a new user account, everything works as expected. Server: When I add a new user account, it takes me back to the index page but the new account doesn't appear. I have to do a hard refresh before the "$session->flash();" message and the new account appear. My Setup I haven't changed anything with the core.php file except change the "debug" line Local: Configure::write('debug', 2); Server: Configure::write('debug', 0); My Work-around For each page where this poses a problem, I have added "$this- >disableCache();" to the function: function index() { $this->disableCache(); . . . } This seems to cause the new account/flash messages to appear the first time without having to do a hard refresh. But I've had to add this to almost every function on my site. And since this is disabling the cache for each of these pages, it causes the site to run very slowly. I have read, re-read, and re-read every section on Caching there is on the CakePHP manual, but I can't seem to figure it out. I've done literally hundreds of Google searches trying to figure this out, but they only come up with instructions on how to add Caching to my site or redirect me back to the CakePHP manual. I'm not sure if my problems are being caused by CakePHP or my server. I am using CakePHP version 1.2.7 I am using MAMP for my local testing My server is a Mac OS X Server 10.5.8 Any assistance would be greatly appreciated. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en