Allow Cache /app/* in Author dispatcher | Community
Skip to main content
Level 3
June 22, 2021
Solved

Allow Cache /app/* in Author dispatcher

  • June 22, 2021
  • 2 replies
  • 1247 views

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.
Best answer by Sameer-Bhalerao

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.

2 replies

Sameer-BhaleraoAdobe EmployeeAccepted solution
Adobe Employee
June 22, 2021

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.

aem_savyAuthor
Level 3
June 22, 2021

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

kchaurasiya
Level 5
June 23, 2021

@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.

 

aem_savyAuthor
Level 3
June 23, 2021

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