Caching dynamic blog content | Community
Skip to main content
Level 3
October 16, 2015
Solved

Caching dynamic blog content

  • October 16, 2015
  • 4 replies
  • 1349 views

To help improve performance I am trying to cache as much as possible. I have a blog that currently uses query parameters e.g. blog.html?archiveDate=2015-01&author=Joe-Bloggs&tag={someTagId}

Is the best way to create a cacheable page to use selectors e.g.

/blog.2015-01.Jo-Bloggs.{someTagId}.hrml

Is it good practice to do this?

Is there a good way of reading the selectors, to avoid having to include them all on each request. The nice thing about query string is its provides a key value for each parameter but with selectors it appears I can only use the values. 

Can I only pass as values for the things I am searching, I would like to do this ...

/blog.2015-01.hrml

/blog.Jo-Bloggs.hrml

/blog.{someTagId}.hrml

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by joerghoh

Hi,

have you thought of changing your content structure? Instead of just

/blog.html

and selecting the exact post via querystrings or selectors, use something like:

/blog/JoesBlog/2015/January/Happy_new_year.html

kind regards,
Jörg

4 replies

joerghoh
Adobe Employee
joerghohAdobe EmployeeAccepted solution
Adobe Employee
October 16, 2015

Hi,

have you thought of changing your content structure? Instead of just

/blog.html

and selecting the exact post via querystrings or selectors, use something like:

/blog/JoesBlog/2015/January/Happy_new_year.html

kind regards,
Jörg

srnya
Level 2
October 16, 2015

There is a way to not cache a few parts of a page alone. Check out the sling dynamic include, here's the link - http://www.cognifide.com/blogs/cq/sling-dynamic-include/ 

Using this, you can make sure that the component that needs to be dynamic alone does not get cached. The rest of the page can get cached.

Hope this helps!

joerghoh
Adobe Employee
Adobe Employee
October 16, 2015

Hi,

SDI looks pretty nice, but first of all I recommend that you structure your content. When you've done that, you can decide, what to cache and then how.

Jörg

smacdonald2008
Level 10
October 16, 2015

There is a good cache guidelines in this AEM topic:

http://docs.adobe.com/docs/en/cq/5-6-1/deploying/performance.html

I have also reached out to the social team to add any additional pointers.