I'm Using Adobe AEM 6.1. Now I want to use Sling Dynamic Include 3.0.
I also added the /enableTTL "1"
in the dispatcher.any file inside of the cache tag, and added the headers in the cache tag
/headers
{
"Cache-Control"
"Content-Disposition"
"Content-Type"
"Expires"
"Last-Modified"
"X-Content-Type-Options"
}
The Sling Dynamic Include works good. But the Problem is that the TTL Parameter is ignored. And I know I need AEM Dispatcher 4.1.11 and higher to use TTL. Well I'm using Dispatcher version 4.2.2 with an apache 2.2. Maybe I need an higher apache version that the TTL works?
My understanding of the TTL is, that I want to cache a file for 5 min, so in this 5 min, the users always get the cached document, and after this 5 min the dispatcher delete the old cached file, and get a new one.
Have somebody any idea? How can I check what is going wrong? I don't get an error or something, just the TTL param is ignored.
Here The Working SDI Include in my HTML
I think with the path is something wrong. After the "...ttl.html" is the resource Type "/cbz/components/elements/bookingcalendar". I think it should end by the .html. But I don't know why this is happen.
The Config
Judging by the HTML rendered, you're dealing with a synthetic resource.
As far as I know, until SDI version 3.1.2, the caching of such resources with TTL was not possible (see SLING-7785 due to the way the resource type was appended as a suffix. Although, to be honest, I'm not sure why you do get a cached document at all. It's hard to tell without looking at the dispatcher cache config.
I suggest you try upgrading SDI to 3.1.2 or higher and using the newly provided configuration.
On a side note, Cognifide no longer maintains the SDI documentation you linked to. The project has been donated to Apache Sling and the most up-to-date docs can be found on the official Apache Sling Website
I've noticed that the official docs do not yet describe this feature so I raised SLING-7914 . If you get it working, feel free to contribute a short how-to guide.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.