Page content is getting cached inside doc root folder directly with pagename instead of /content/projetname/pagename (fullpath)) | Community
Skip to main content
May 30, 2024

Page content is getting cached inside doc root folder directly with pagename instead of /content/projetname/pagename (fullpath))

  • May 30, 2024
  • 3 replies
  • 1121 views

Hi All,

 

Ideally, the page should get cached with its full path.

The page content is getting cached inside the doc root folder of the dispatcher directly with the page Name instead of /content/projetname/pagename.

Not sure what configurations are wrong. 

 

Thanks in advance.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

joerghoh
Adobe Employee
Adobe Employee
May 30, 2024

when you write "should get cached", do you mean cached at the dispatcher level?

 

The dispatcher caches files with its full path (taken from the URL) below the configured docroot. That means:

I am not aware of any configuration on the dispatcher to change that. (Of course you can use mod_rewrite to rewrite the path of the incoming request to something convenient, but that's mod_rewrite and not dispatcher.)

May 30, 2024

Issue is that, it is not creating .stat file for the cached folders other than /content in the $DOCROOT.
When I hit the page https://www.hostname.internal/product/page1 , it creates cached page page1 inside the folder product but there is no .stat file created under product folder.
I have set the statfilelevel to 3.

/statfileslevel "3"

 

joerghoh
Adobe Employee
Adobe Employee
May 30, 2024

when you replicate that page (and therefor trigger an invalidation), at which directory is the closest .stat file?

HrishikeshKagne
Community Advisor
Community Advisor
May 30, 2024

Hi @nasrinj114 ,

It sounds like the caching behavior of the Dispatcher is not configured correctly. By default, the Dispatcher caches content based on the URL path, which should include the full path to the page content.

Here are a few things you can check to troubleshoot the issue:

1. Check the caching rules in the Dispatcher configuration file: Make sure that the caching rules in the `dispatcher.any` file are configured correctly. The caching rules should include the full path to the page content. For example, the `cache` section should include a rule like this:

```
/cache
{
/rules
{
/0000
{
/glob "*"
/type "allow"
}
}
/docroot "/path/to/docroot"
}
```

2. Check the cache root directory: Make sure that the cache root directory is set correctly in the `dispatcher.any` file. The cache root directory should be set to a directory that is writable by the Dispatcher process. For example:

```
/cache
{
/root "/path/to/cache/root"
}
```

3. Check the permissions of the cache root directory: Make sure that the cache root directory has the correct permissions. The Dispatcher process should have write access to the cache root directory.

4. Check the URL paths in the page content: Make sure that the page content includes the correct URL paths. The URL paths should include the full path to the page content, including the project name. For example:

```
<link rel="stylesheet" href="/content/myproject/mypage.css">
```

If you have checked all of the above and the issue still persists, it would be helpful to review the logs of the Dispatcher and the web server to see if there are any error messages or warnings related to caching.

Hrishikesh Kagane
kautuk_sahni
Community Manager
Community Manager
June 4, 2024

@nasrinj114 Did you find the suggestions from users helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.

Kautuk Sahni