Expand my Community achievements bar.

SOLVED

Allow Cache /app/* in Author dispatcher

Avatar

Level 3

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.

 

1 Accepted Solution

Avatar

Correct answer by
Level 4

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.

View solution in original post

4 Replies

Avatar

Correct answer by
Level 4

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.

Avatar

Level 3

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

Avatar

Level 6

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

kchaurasiya_1-1624418590626.png

Thank You.

 

Avatar

Level 3

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