Saturday, November 29, 2008

Re: View caching and Ajax conflict with each other?

No Sam,
It was me missing something obvious :|

Because the request handler forces the ajax layout, i'd never tried
appending the .ajax, as I didn't want to hard code .ajax links in my
views.
Of course, now I realise I can just append .ajax to URLs with my
javascript, and everything works fine...

Thanks mate!

On Nov 27, 4:44 pm, "Sam Sherlock" <sam.sherl...@gmail.com> wrote:
> Since your using parseExtensions its a bit of a puzzler.  Since this is
> exactly how I was hoping caching would work with ajax, and when I came to
> set up caching I had no trouble at all.  Setting it up was simplistic and I
> did nothing special.  I was overjoyed with the results and ease of set up (I
> was anticipating some complexity) - I set up caching just around the release
> of rc2 (might have been just before)
>
> Do you also have the same issue with xml?   I have no troubles caching json,
> ajax or xml different cases
>
> sounds to me as though you've got what you need, so I am stumped. Perhaps a
> more experienced baker might have some pointers - could well be I am missing
> something obvious :)
>
> 2008/11/27 the_woodsman <elwood.ca...@gmail.com>
>
>
>
> > Interesting - I'm confident I am using parseExtensions (as I
> > haev .pdf, .csv, .xml layouts, folders and views) - is that the right
> > answer??
> > I've never seen the _ajax extension in my view files... I'm on RC2...
> > you don't happen to know if this is a recent addition do you?
>
> > Thanks for the info....
>
> > On Nov 27, 3:49 pm, "Sam Sherlock" <sam.sherl...@gmail.com> wrote:
> > > Are you using parseExtensions?
>
> > > in my cache I have cache files in standard format and also those in ajax
>
> > > eg: for gallery controller show action I have 2 types of files reated in
> > the
> > > cache
> > >   gallery_show_91_6675.php
> > >   gallery_show_91_6671_ajax.php
>
> > > hth
> > > Sam
>
> > > 2008/11/27 the_woodsman <elwood.ca...@gmail.com>
>
> > > > Hi Bakers,
>
> > > > I've posted about this before, but I think I can express the issue
> > > > clearer now, so I thought I'd try again:
>
> > > > I don't understand how view caching and Ajax can work together.
>
> > > > When ajax calls my app for a page, it returns with minimal layout etc,
> > > > which is correct.
> > > > I also have non ajax links to the same pages, which *should* return
> > > > the full layout etc.
>
> > > > However, if the hit that cached the page was an ajax one, all normal
> > > > links will return ajax specific content (i.e no layout) until the
> > > > cache expires.
>
> > > > I can't be the first person to come across this... any known solutions/
> > > > workarounds?
>
> > > > Thanks in advance,
> > > > Elwood
--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: