Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Caching dynamic blog content

Avatar

Level 4

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

 

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

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

View solution in original post

4 Replies

Avatar

Correct answer by
Employee Advisor

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

Avatar

Level 2

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!

Avatar

Employee Advisor

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

Avatar

Level 10

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.