Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Unable to create .stat file

Avatar

Level 4

Hi,

I am trying to implement dispatcher flush. Hear is my cache properties. In my cache folders are getting created. But I am unable to found any .stat file in any folder. Any reason why this happening? 

/cache
      {
      # The docroot must be equal to the document root of the webserver. The
      # dispatcher will store files relative to this directory and subsequent
      # requests may be "declined" by the dispatcher, allowing the webserver
      # to deliver them just like static files.
      /docroot "D:/Apache2.2/cache"
      
      # Sets the level upto which files named ".stat" will be created in the 
      # document root of the webserver. When an activation request for some 
      # page is received, only files within the same subtree are affected 
      # by the invalidation.
      
      /statfileslevel "1"
      
      # Flag indicating whether to cache responses to requests that contain
      # authorization information.
      /allowAuthorized "0"
      
      # Flag indicating whether the dispatcher should serve stale content if
      # no remote server is available.
      #/serveStaleOnError "1"
      
      # The rules section defines what responses should be cached based on
      # the requested URL. Please note that only the following requests can
      # lead to cacheable responses:
      #
      # - 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 "deny"
          }
        /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
        {
        # Uncomment the following to restrict activation requests to originate
        # from "localhost" only.
        #
        #/0000
        #  {
        #  /glob "*"
        #  /type "deny"
        #  }
        #/0001
        #  {
        #  /glob "127.0.0.1"
        #  /type "allow"
        #  }
        }
        
      # The ignoreUrlParams section contains query string parameter names that
      # should be ignored when determining whether some request's output can be
      # cached or delivered from cache.
      #
      # In this example configuration, the "q" parameter will be ignored. 
      #/ignoreUrlParams
      #  {
      #  /0001 { /glob "*" /type "deny" }
      #  /0002 { /glob "q" /type "allow" }
      #  }
      
      }

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi,

did you restart Apache after making your changes to dispatcher.any?

And you have configured the dispatcher flush agent?[1] This can be on author or publish (usually publish)

Regards,

Opkar

[1] https://docs.adobe.com/docs/en/dispatcher/page-invalidate.html#par_187_4_title

View solution in original post

6 Replies

Avatar

Level 2

I think the .stat file is created only at the root folder.  Do you see it in the document root folder?

Avatar

Level 4

I couldn't find it in root folder. I tried by changing statfileslevel to 3. Then also its not coming. Am I missing something ?

Avatar

Employee

Is the process that Apache is running as, the same user that owns the directories?

Is this a linux or windows box?

So the folder and files are being created? If you update the page, is the old page deleted and the new page created?

Regards,

Opkar

Avatar

Level 4

It is windows box. After updating page old pages are remaining same. New pages are not getting created.

Avatar

Correct answer by
Employee

Hi,

did you restart Apache after making your changes to dispatcher.any?

And you have configured the dispatcher flush agent?[1] This can be on author or publish (usually publish)

Regards,

Opkar

[1] https://docs.adobe.com/docs/en/dispatcher/page-invalidate.html#par_187_4_title

Avatar

Level 4

Thanks Opkar Gill

I had configured dispatcher flush agent in author and activated it. Then it's working as expected.