Cache from Dispatcher updated unexpected | Community
Skip to main content
annieyang87957
Level 2
May 17, 2023

Cache from Dispatcher updated unexpected

  • May 17, 2023
  • 2 replies
  • 2328 views

Hi guys, 

we are synchronizing the content between different version of AEM. Here're the steps I did: 

1. In author, build a package in older version, and download. 

2. upload and install the package in the newest version of author. 

3. since the content are published before, we replicated this package to allow the publisher has the content. 

premise: we copied the caches in the dispatcher from the older version to the dispatcher of the new version as a backup.

 

The problem here is, in my opinion, I believe that by using the package manager(not proper workflow process) to synchronize the content on author and publish, the dispatcher won't know that the content on the publish has updated, therefore, I thought that the cache will remain until I start a new workflow to let the dispatcher know that the cache requires to get a new file. Therefore, we originally planned to listed all the page files we have modified and clean the cache of those files.

 

However, when we requested the dispatcher ip along with the content path to get one of the page(in the updated package I just mentioned), the dispatcher log showed that the cache is updated!?

please see the log result below. 

 
`cache file is older than lastflush -> flush [content/the requested page path.html]`  
`cache-action for [content/the requested page path.html]: CREATE` 
 
❓Confusing Points:
1. what's the "lastflush" time definition in dispatcher?
2. when does "lastflush" be stored?
3. how does the dispatcher know the the cache is too old so it has to get the new one?
 
the result really confused me. Will be really appreciated if someone know the reasons. 
 
Thanks!!
 
 
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

Rohan_Garg
Community Advisor
Community Advisor
May 17, 2023

Hi @annieyang87957

When you replicated the content from newer version of author to publish, the replication agent on new author sends a cache invalidation request to Dispatcher when a page is published. The request causes Dispatcher to eventually refresh the file in the cache as new content is published.
Hence, the cache is expected to be updated if the replication agent is involved in pushing content. 

However, in case of package manager's replication it won't clear the cache.

annieyang87957
Level 2
May 17, 2023

Hi @rohan_garg 

Thanks for the reply, let me clear things up a little bit.

We used the "Package Manager" to build a list of pages, then in the author, we use the replicate action in Package Manager. (We are not using the regular publish process.)

We wondered that if we used the Package Manager replicate action, this action will trigger the dispatcher flush agent in Publisher as well?

We previously thought that by using the replicate action in Package Manager, the dispatcher flush won'y be triggered.

 

Rohan_Garg
Community Advisor
Community Advisor
May 17, 2023

Hi @annieyang87957,

We had actually tailored the package replication to invoke invalidation requests.

When you activate packages, the publish does not send invalidation requests for the content of the package. That's default behavior.

 

Coming back to your query then-

premise: we copied the caches in the dispatcher from the older version to the dispatcher of the new version as a backup.

When the dispatcher cache is copied to the new version, is the timestamp for .stat files modified to the time of copying?

ManviSharma
Adobe Employee
Adobe Employee
May 17, 2023

Hi,

 

  1. The "lastflush" time in the dispatcher refers to the timestamp of the last cache clearing or invalidation.
  2. The "lastflush" time is stored internally by the dispatcher, and it can be based on various factors such as explicit cache invalidation requests or time-based cache expiration.
  3. The dispatcher determines if the cache is outdated by comparing the "lastflush" time with the timestamp of the requested content. If the cache's "lastflush" time is older than the content, the dispatcher recognizes that the cache needs to be updated.

Please review dispatcher configurations, and rules to ensure proper cache invalidation.