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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

How to access cached content from dispatcher?

GK-AEM
Level 9
Level 9

Hi All,

I want to access cached content resided at dispatcher.Let's say  i have image and it has four renditions.

I want to validate them whether they are cached or not without logging into dispatcher host.

Please help!!!

Thanks,

Kishore

1 Accepted Solution
kautuk_sahni
Correct answer by
Community Manager
Community Manager

Jitendra S.Tomar wrote...

Hi KIshore,

To  validate whether a particular asset is cached or not. Check the following things:

  • Is asset return 404? if not then dispatcher is allowing this asset to be served.
  • Check the response headers of particular asset request in the browser console.
  • Check Cache-Control & X-Cache response headers. it provides more information about caching.

Kishore@CQ wrote...

Hi All,

I want to access cached content resided at dispatcher.Let's say  i have image and it has four renditions.

I want to validate them whether they are cached or not without logging into dispatcher host.

Please help!!!

Thanks,

Kishore

 

 

 

Adding to Jitendra's comment

"To  validate whether a particular asset is cached or not. Check the following things:

  • Is asset return 404? if not then dispatcher is allowing this asset to be served.
  • Check the response headers of particular asset request in the browser console.
  • Check Cache-Control & X-Cache response headers. it provides more information about caching.

"

The Adobe AEM dispatcher simply takes the response body from requests made into the AEM instances and saves them as files that then the httpd can deliver. The dispatcher can be configured to allow requests to be either cached or sent directly to the AEM instance. This configuration is done in a file dispatcher.any. Check the documentation, it is good enough.

In general you decide what is cached and what not by defining a set of rules. "allow" means to cache and "deny" not to cache. For example:

        /rules
        {
          /0000  { /glob "*" /type "allow" }
          /0001  { /glob "/en/news/*" /type "deny" }
          /0002  { /glob "*/private/*" /type "deny"  }   
         }

Will:

  • by default cache every request (rule 0000)
  • send to the instance requests to that contain "/en/news/" and "/private/*" (rules 0001 and 0002).

 

Reference article :- http://stackoverflow.com/questions/27248505/how-to-find-out-what-does-dispatcher-cache

Community Article :- http://www.wemblog.com/2012/05/how-to-use-dispatcher-to-serve-cache.html

//How to use dispatcher to serve cache content if render is unavailable in AEM

 

~kautuk

View solution in original post

0 Replies
Jitendra_S_Toma
Level 9
Level 9

Hi KIshore,

To  validate whether a particular asset is cached or not. Check the following things:

  • Is asset return 404? if not then dispatcher is allowing this asset to be served.
  • Check the response headers of particular asset request in the browser console.
  • Check Cache-Control & X-Cache response headers. it provides more information about caching.

Kishore@CQ wrote...

Hi All,

I want to access cached content resided at dispatcher.Let's say  i have image and it has four renditions.

I want to validate them whether they are cached or not without logging into dispatcher host.

Please help!!!

Thanks,

Kishore

 

antoniom5495929
Level 7
Level 7

If you have dispatcher module configured to cache images, each image request is served by dispatcher if the request comes without a query string.

Even if, if you have your dispatcher configured with 'allow authorized / false' your loggedin request doesn't take values from the cache.

I hope this can help you.

kautuk_sahni
Correct answer by
Community Manager
Community Manager

Jitendra S.Tomar wrote...

Hi KIshore,

To  validate whether a particular asset is cached or not. Check the following things:

  • Is asset return 404? if not then dispatcher is allowing this asset to be served.
  • Check the response headers of particular asset request in the browser console.
  • Check Cache-Control & X-Cache response headers. it provides more information about caching.

Kishore@CQ wrote...

Hi All,

I want to access cached content resided at dispatcher.Let's say  i have image and it has four renditions.

I want to validate them whether they are cached or not without logging into dispatcher host.

Please help!!!

Thanks,

Kishore

 

 

 

Adding to Jitendra's comment

"To  validate whether a particular asset is cached or not. Check the following things:

  • Is asset return 404? if not then dispatcher is allowing this asset to be served.
  • Check the response headers of particular asset request in the browser console.
  • Check Cache-Control & X-Cache response headers. it provides more information about caching.

"

The Adobe AEM dispatcher simply takes the response body from requests made into the AEM instances and saves them as files that then the httpd can deliver. The dispatcher can be configured to allow requests to be either cached or sent directly to the AEM instance. This configuration is done in a file dispatcher.any. Check the documentation, it is good enough.

In general you decide what is cached and what not by defining a set of rules. "allow" means to cache and "deny" not to cache. For example:

        /rules
        {
          /0000  { /glob "*" /type "allow" }
          /0001  { /glob "/en/news/*" /type "deny" }
          /0002  { /glob "*/private/*" /type "deny"  }   
         }

Will:

  • by default cache every request (rule 0000)
  • send to the instance requests to that contain "/en/news/" and "/private/*" (rules 0001 and 0002).

 

Reference article :- http://stackoverflow.com/questions/27248505/how-to-find-out-what-does-dispatcher-cache

Community Article :- http://www.wemblog.com/2012/05/how-to-use-dispatcher-to-serve-cache.html

//How to use dispatcher to serve cache content if render is unavailable in AEM

 

~kautuk

View solution in original post