Hi Gaurav,
Thanks for replying. Below are my use cases. .
Use Case-1
For example I have a page in author (http://localhost:4502/content/trainingproject/en.html) .Now I did not change anything in this page and this page is static.
Now I am requesting this page from my dispatcher like below
http://localhost/content/trainingproject/en.html
My main requirement come here. When I request http://localhost/content/trainingproject/en.html then en.html page should come from dispatcher cache , not from publish.
When I request any page which is not changed then it will come from dispatcher cache. It is working fine. No issues here. But the issue comes in second use-case
To fulfill this I changed in my dispatcher.any file like below (in bold) and it is working fine.
# The load will be balanced among these render instances
/renders
{
/rend01
{
# Hostname or IP of the render
/hostname "localhost"
# Port of the render
/port "80"
# Connect timeout in milliseconds, 0 to wait indefinitely
# /timeout "0"
}
}
/filter
{
# Deny everything first and then allow specific entries
/0001 { /type "deny" /glob "*" }
# Open consoles
# /0011 { /type "allow" /url "/admin/*" } # allow servlet engine admin
# /0012 { /type "allow" /url "/crx/*" } # allow content repository
# /0013 { /type "allow" /url "/system/*" } # allow OSGi console
# Allow non-public content directories
# /0021 { /type "allow" /url "/apps/*" } # allow apps access
# /0022 { /type "allow" /url "/bin/*" }
/0023 { /type "allow" /url "/content*" } # disable this rule to allow mapped content only
# /0024 { /type "allow" /url "/libs/*" }
# /0025 { /type "deny" /url "/libs/shindig/proxy*" } # if you enable /libs close access to proxy
# /0026 { /type "allow" /url "/home/*" }
# /0027 { /type "allow" /url "/tmp/*" }
# /0028 { /type "allow" /url "/var/*" }
# Enable extensions in non-public content directories, using a regular expression
/0041
{
/type "allow"
/extension '(clientlibs|css|gif|ico|js|png|swf|jpe?g|woff2?)'
}
# Enable features
/0062 { /type "allow" /url "/libs/cq/personalization/*" } # enable personalization
# Deny content grabbing, on all accessible pages, using regular expressions
/0081
{
/type "deny"
/selectors '((sys|doc)view|query|[0-9-]+)'
/extension '(json|xml)'
}
# Deny content grabbing for /content
/0082
{
/type "deny"
/path "/content"
/selectors '(feed|rss|pages|languages|blueprint|infinity|tidy)'
/extension '(json|xml|html)'
}
# Uncomment the following to allow one-level json requests
# /0087 { /type "allow" /method "GET" /extension "json" /selectors "1" }
}
# The cache section regulates what responses will be cached and where.
/cache
{
# ###/docroot "/opt/communique/dispatcher/cache"
/docroot "C:/Users/sunchoudhury/SUNITA-Work/AEM-6.3/dispatcher/cache"
/allowAuthorized "0"
/statfileslevel "5"
# - HTTP method is GET
# - URL has an extension
# - Request has no query string
# - Request has no "Authorization" header (unless allowAuthorized is 1)
/rules
{
/0000
{
# 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
/glob "*"
/type "allow"
}
}
# The invalidate section defines the pages that are "invalidated" after
# any activation. Please note that the activated page itself and all
# related documents are flushed on an modification. For example: if the
# page /foo/bar is activated, all /foo/bar.* files are removed from the
# cache.
/invalidate
{
/0000
{
/glob "*" /type "allow"
}
/0001
{
# Consider all HTML files stale after an activation.
/glob "*.html"
/type "allow"
}
/0002
{
/glob "/etc/segmentation.segment.js"
/type "allow"
}
/0003
{
/glob "*/analytics.sitecatalyst.js"
/type "allow"
}
}
# The allowedClients section restricts the client IP addresses that are
# allowed to issue activation requests.
/allowedClients
{
}
}
# The statistics sections dictates how the load should be balanced among the
# renders according to the media-type.
Use Case-2
When I will change my page in author http://localhost/content/trainingproject/en.html and activate the page then the updated page will store in the dispatcher cache (the /docroot "C:/Users/sunchoudhury/SUNITA-Work/AEM-6.3/dispatcher/cache"). But in my case it is not storing in dispatcher cache. Can you please let me know how can I achieve this.
According to my knowledge it is not possible because when you will activate page and change the /port of rend01 to 4503 , then it will work.
/rend01
{
# Hostname or IP of the render
/hostname "localhost"
# Port of the render
/port "80"
# Connect timeout in milliseconds, 0 to wait indefinitely
# /timeout "0"
}
Please suggest.