1.2 Cache issues

2008-05-27 Thread Chez17

I am trying to recode my blog as a project to learn cakePHP, and the
only thing not working now is the cache. I have turned it off
completely using Configure::write('Cache.disable', true); and I have
even inserted  in the code and nothing is working. I
have set up FireFox to not cache anything so I am pretty sure that its
not a browser issue. Whats not working is when a user submits a
comment, the page reloads and the comment doesn't appear. You have to
reload the page again to see the comment. As I said, I have turned it
off, used the  code but it still doesn't work. Is there
anything else I can do?

thanks,
Dave
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: cache issues

2008-04-10 Thread Dave J

The main issue here is the difference between the Cake caches and the
browser caches. You still want the Cake caches fully enabled, however
(especially for sites which frequently change their content, such as
news sites), you dont want the browser to keep a cached copy of the
page, or viewers might end up seeing stale pages.

"Configure::write('Cache.disable', true);" doesn't have any effect on
the browser cache at all, just the Cake ones.

Just make sure you send the correct headers.



On Apr 10, 10:59 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> You should try this directive in config/core.php. It is supposed to
> turn off all caching.
> Configure::write('Cache.disable', true);
> It is on line 71 (or close by) but commented ut.
>
> Also make sure that you really really make the browser drop its cache
> too. It is not enough to disable the cache in Cake if the browser
> already has a cached version stored.
>
> On Apr 10, 10:30 am, Dave J <[EMAIL PROTECTED]> wrote:> Hi Ron,
>
> > Usually adding $this->disableCache();  to the beforeRender() sends the
> > correct headers to the browser so it won't cache the pages.
>
> > However if you're using Cake's View caching, you'll soon find out (and
> > rightly so) that no code from the Controllers gets executed after the
> > first hit. We worked around this by putting the following lines in the
> > main layout.
>
> >     
> >      >         header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
> >         header("Pragma: no-cache");
> >     ?>
> >     
>
> > Has anyone come across this or came up with a cleaner solution?
>
> > On Apr 9, 6:26 pm, Ron Astonvarga <[EMAIL PROTECTED]> wrote:
>
> > > Hello,
>
> > > I have an issue with caching.
>
> > > I have cache switched off (     Configure::write('Cache.check', true); //
> > > in core.php )
>
> > > But my actions are still cached and I need to click on refresh every
> > > time I want see the results of the action.
> > > I tried to add
>
> > > 
> > > 
>
> > > to header of xhtml file, but this doesn't help too.
>
> > > thanks for any idea
> > > (running today's nightly build, tried 1.2.0.6311 from 01/02 too)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: cache issues

2008-04-10 Thread [EMAIL PROTECTED]


You should try this directive in config/core.php. It is supposed to
turn off all caching.
Configure::write('Cache.disable', true);
It is on line 71 (or close by) but commented ut.

Also make sure that you really really make the browser drop its cache
too. It is not enough to disable the cache in Cake if the browser
already has a cached version stored.


On Apr 10, 10:30 am, Dave J <[EMAIL PROTECTED]> wrote:
> Hi Ron,
>
> Usually adding $this->disableCache();  to the beforeRender() sends the
> correct headers to the browser so it won't cache the pages.
>
> However if you're using Cake's View caching, you'll soon find out (and
> rightly so) that no code from the Controllers gets executed after the
> first hit. We worked around this by putting the following lines in the
> main layout.
>
>     
>              header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
>         header("Pragma: no-cache");
>     ?>
>     
>
> Has anyone come across this or came up with a cleaner solution?
>
> On Apr 9, 6:26 pm, Ron Astonvarga <[EMAIL PROTECTED]> wrote:
>
> > Hello,
>
> > I have an issue with caching.
>
> > I have cache switched off (     Configure::write('Cache.check', true); //
> > in core.php )
>
> > But my actions are still cached and I need to click on refresh every
> > time I want see the results of the action.
> > I tried to add
>
> > 
> > 
>
> > to header of xhtml file, but this doesn't help too.
>
> > thanks for any idea
> > (running today's nightly build, tried 1.2.0.6311 from 01/02 too)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: cache issues

2008-04-10 Thread Dave J

Hi Ron,

Usually adding $this->disableCache();  to the beforeRender() sends the
correct headers to the browser so it won't cache the pages.

However if you're using Cake's View caching, you'll soon find out (and
rightly so) that no code from the Controllers gets executed after the
first hit. We worked around this by putting the following lines in the
main layout.






Has anyone come across this or came up with a cleaner solution?



On Apr 9, 6:26 pm, Ron Astonvarga <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I have an issue with caching.
>
> I have cache switched off (     Configure::write('Cache.check', true); //
> in core.php )
>
> But my actions are still cached and I need to click on refresh every
> time I want see the results of the action.
> I tried to add
>
> 
> 
>
> to header of xhtml file, but this doesn't help too.
>
> thanks for any idea
> (running today's nightly build, tried 1.2.0.6311 from 01/02 too)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



cache issues

2008-04-09 Thread Ron Astonvarga

Hello,

I have an issue with caching.

I have cache switched off ( Configure::write('Cache.check', true); //
in core.php )

But my actions are still cached and I need to click on refresh every
time I want see the results of the action.
I tried to add




to header of xhtml file, but this doesn't help too.

thanks for any idea
(running today's nightly build, tried 1.2.0.6311 from 01/02 too)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---