In the production environment, cache duration is set to 15 mins. We are facing an issue while publishing the pdfs files.

Published PDFs are not reflecting on the site until application pool is recycled. Admin refresh is also disabled over there. Binary Folder is not getting updated until the application pool is recycled. Does anyone have any idea about the reason behind that? How can I get the updated content in Binary folder without recycling application pool and admin/refresh?

We have implemented customized version of output cache as per this blog

Here is my cache configuration:

<!-- DD4T objects: -->
>        <add name="Page" cacheName="longLivedCache" />
>        <add name="ComponentPresentation" cacheName="longLivedCache" />
>        <!-- DXA objects: -->
>        <add name="PageModel" cacheName="longLivedCache" />
>        <add name="IncludePageModel" cacheName="longLivedCache" />
>        <add name="EntityModel" cacheName="longLivedCache" />
>        <add name="Navigation_Static" cacheName="longLivedCache" />
>        <add name="Navigation_Dynamic" cacheName="longLivedCache" />
>        <add name="NavTaxonomy" cacheName="longLivedCache" />
>        <add name="BinaryPublishDate" cacheName="longLivedCache" />
>        <add name="CIL-BROKER" cacheName="longLivedCache" />
>        <add name="CIL-DYNAMIC" cacheName="longLivedCache" />
>        <add name="CIL-LINKING" cacheName="longLivedCache" />
>        <add name="CIL-INTERNAL" cacheName="longLivedCache" />
>        <add name="RenderedOutput" cacheName="longLivedCache" />

and the duration of longLivedCache is set to 900 sec. But changes are not reflecting even after 24 hours.

I suggest that you first disable you custom cache implementation to ensure that you are having an issue with the base implementation. Also, you can set a lower value for your BinaryCache to reproduce the issue. Can you setup your application log to "DEBUG" and refer the logs when you reproduce the issue? If you see the below message in your logs, you probably hit an issue that we faced quite sometime ago.

"Binary with URL >>> is modified, but only since last application restart, so no action required"

I noticed a similar issue with DXA 1.2 and have made the following update to the BinaryFileManager. I am publishing the binaries as DCPs from from Tridion CM though and do not have any third party caching layer involved.

localization.LastRefresh.CompareTo(lastPublishedDate) < 0 && (MimeMapping.GetMimeMapping(localFilePath).Equals("application/json"))

The existing implementation for BinaryFileManager is HERE. I don't remember adding an issue in GitHub though. If you solve your problem, I will add an issue with relevant information.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.