Jahia Template Forum > Stop caching for...

0 (0 Good)
0 (0 Bad)

Stop caching for a page

by  jocsch »  2011/06/07 20:04

Hi all,
I am trying to create a page that contains a list of all page links within a site in JSON format. To do so I wrote a tag very similar to the sitemap tag which I placed in a template and then created a page from that template. However now the page is cached heavily and I never get the most recent set of links.
So this doesn't seem to be the best way to realize a jsonified sitemap. What would be the best way to get there? I see in the web templates that there is a engine for the sitemap. Can I create anything similar?

Thanks,
Markus
  • Stop caching for a page
    2011/06/07 20:04

    jocsch Hi all,<br/>I am trying to create a page that contains a list of all page links within a site in JSON format. To do so I wrote a tag very similar to the sitemap tag which I placed in a template and then created a page from that template. However now the page is cached heavily and I never get the most recent set of links. <br/>So this doesn't seem to be the best way to realize a jsonified sitemap. What would be the best way to get there? I see in the web templates that there is a engine for the sitemap. Can I create anything similar?<br/><br/>Thanks,<br/> Markus

  • Number of messages  2
    Registration date Jun 7, 2011
    0 (0 Good)
    0 (0 Bad)

    Re: Stop caching for a page

    by  shyrkov »  2011/06/07 20:04

    Hello Markus,

    you should be able to achieve it using your approach, but additionally setting proper response content type and disabling page caching.

    Here is an example of the template, that produces JSON data as response and quot;tells
  • Re: Stop caching for a page
    2011/06/07 20:04

    shyrkov Hello Markus,<br/><br/>you should be able to achieve it using your approach, but additionally setting proper response content type and disabling page caching.<br/><br/>Here is an example of the template, that produces JSON data as response and quot;tells

  • Number of messages  407
    Registration date Jun 7, 2011
    0 (0 Good)
    0 (0 Bad)

    Re: Stop caching for a page

    by  jocsch »  2011/06/07 20:04

    Thanks Sergiy. Definitely learned something here.
    I have taken another route and have extended the sitemap page. When I pass format=json to the sitemap query it will return JSON, otherwise it will return the HTML version.

    The tag I write is not a pure sitemap translation. It creates input for the gears localserver plugin to cache cms content in the browser. However it is a quickampdirty prototype only so far.

    Regards,
    Markus
  • Re: Stop caching for a page
    2011/06/07 20:04

    jocsch Thanks Sergiy. Definitely learned something here.<br/>I have taken another route and have extended the sitemap page. When I pass format=json to the sitemap query it will return JSON, otherwise it will return the HTML version.<br/><br/>The tag I write is not a pure sitemap translation. It creates input for the gears localserver plugin to cache cms content in the browser. However it is a quickampdirty prototype only so far.<br/><br/>Regards,<br/> Markus

  • Number of messages  2
    Registration date Jun 7, 2011
    Contact
    Share
    Feedback

    Get in touch

    Whether you are a current user or if you are just evaluating Jahia, we are here to help.

    Contact us

    Share this page