Allow Cache /app/* in Author dispatcher | Community
Skip to main content
Level 3
Jun 22, 2021 5:33 AM UTC
Solved

Allow Cache /app/* in Author dispatcher

Hi All,

 

I see that when we create AEM project from mvn archetype we have dispatcher rules created as part of the project.

I see the cache rules for author as below

# Put entries of items you do or don't want to cache in apaches doc root
# the globbing pattern to be compared against the url
# example: * -> everything
# : /foo/bar.* -> only the /foo/bar documents
# : /foo/bar/* -> all pages below /foo/bar
# : /foo/bar[./]* -> all pages below and /foo/bar itself
# : *.html -> all .html files
/0000 {
/glob "*"
/type "deny"
}
/0001 {
/glob "/libs/*"
/type "allow"
}
/0002 {
/glob "/libs/*.html"
/type "deny"
}
# Don't cache csrf login tokens
/0003 {
/glob "/libs/granite/csrf/token.json"
/type "deny"
}
/0004 {
/glob "/apps/*"
/type "allow"
}
/0005 {
/glob "/apps/*.html"
/type "deny"
}
# This page contains a "Welcome, User XXX" message and shouldn't be cached
/0006 {
/glob "/libs/cq/core/content/welcome.*"
/type "deny"
}

 

my question is why do we have to cache /apps/* and /libs in author dispatcher. I read in one of the adobe doc its required for good authoring experience but it does not state anything explicitly . Can some one tell me is it required.

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Sameer-BhaleraoAccepted solution
Employee
Jun 22, 2021 9:16 AM UTC

Here good authoring experience means faster load by allowing cached content serve from dispatcher and no need to go to AEM server. Specifically on author instance only cache static content (js,css ) and steer clear of caching actual content as stale content can become an issue.

4 replies

kchaurasiya
Level 5
Jun 23, 2021 3:23 AM UTC

@aem_savy I think we allow the app and lib access on these path (/app/* , /libs/) whenever request comes for the dispatcher.These path content the components, client-lib and OOTB components. I think you would have created the AEM project from archetype 26 and upper version and going forward this dispatcher module configuration comes default with AEM Project.So we can keep this configuration as part of the code. 

As i had created the my AEM project with Archetype 13 and there is no default dispatcher module comes with this so here we have to do the dispatcher configuration manually and here also you have to allow both the folder path (app and lib) to the dispatcher. Please see the snapshot below for the reference. Hope this help.

 

File Name : dispatcher.any

Thank You.

 

Translate
aem_savyAuthor
Level 3
Jun 23, 2021 4:30 AM UTC

Thanks for that . This helps. Is the screen shot attached is for Author Dispatcher Config

Translate
Sameer-BhaleraoAccepted solution
Employee
Jun 22, 2021 9:16 AM UTC

Here good authoring experience means faster load by allowing cached content serve from dispatcher and no need to go to AEM server. Specifically on author instance only cache static content (js,css ) and steer clear of caching actual content as stale content can become an issue.

Translate
aem_savyAuthor
Level 3
Jun 22, 2021 11:27 PM UTC

Thanks Sameer, I understand what Caching is for. My question is what in specific are we achieving by caching /apps/*  in author. Is it OK not to cache apps in author

Translate