Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

How to Cache Site Pages with Forms

Avatar

Avatar
Validate 1
Level 1
timr69563937
Level 1

Likes

0 likes

Total Posts

14 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Ignite 1
Give Back 3
Give Back
Affirm 1
View profile

Avatar
Validate 1
Level 1
timr69563937
Level 1

Likes

0 likes

Total Posts

14 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Ignite 1
Give Back 3
Give Back
Affirm 1
View profile
timr69563937
Level 1

08-10-2019

We have a multilingual site following the standard form of /country/language/page, but those pages include an embedded adaptive form. The page content is in the correct language, but the form requires the querystring parameter afAcceptLang in order to load the correct dictionary. This works fine except when it comes to caching on the dispatcher. Whatever language is first requested is the one that gets cached. How can we cache distinct files for, say, /ca/en/page.html?afAcceptLang=en-ca and /ca/fr/page.html?afAcceptLang=fr-ca?

I have seen some forum threads out here dealing with querystring in general or custom querystring parameters, but this is a parameter required by AEM. The suggested solution is to rewrite the request and turn the querystring parameter into a selector or something. But if we do that, wouldn't we then have to customize how AEM adaptive forms responds to requests and loads language dictionaries? If that's the case, where to start?

Is there no other way to accomplish this?

Tim