<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Dispatcher cache clear strategy for service in Adobe Experience Manager Questions</title>
    <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/dispatcher-cache-clear-strategy-for-service/m-p/541721#M134507</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a service rendering at ../../test.xml and it returns some data (according to backend business logic) of the last 10 activated pages of a particular template.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Eg. getting details of the last 10 blog articles.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is the best way to cache this service in dispatcher and clear the cache on activation of any page under a particular hierarchy/template type?&lt;/P&gt;</description>
    <pubDate>Fri, 19 Aug 2022 11:46:40 GMT</pubDate>
    <dc:creator>VinayHegde</dc:creator>
    <dc:date>2022-08-19T11:46:40Z</dc:date>
    <item>
      <title>Dispatcher cache clear strategy for service</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/dispatcher-cache-clear-strategy-for-service/m-p/541721#M134507</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a service rendering at ../../test.xml and it returns some data (according to backend business logic) of the last 10 activated pages of a particular template.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Eg. getting details of the last 10 blog articles.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is the best way to cache this service in dispatcher and clear the cache on activation of any page under a particular hierarchy/template type?&lt;/P&gt;</description>
      <pubDate>Fri, 19 Aug 2022 11:46:40 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/dispatcher-cache-clear-strategy-for-service/m-p/541721#M134507</guid>
      <dc:creator>VinayHegde</dc:creator>
      <dc:date>2022-08-19T11:46:40Z</dc:date>
    </item>
    <item>
      <title>Re: Dispatcher cache clear strategy for service</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/dispatcher-cache-clear-strategy-for-service/m-p/541741#M134515</link>
      <description>&lt;P&gt;&lt;EM&gt;Hi&amp;nbsp;&lt;LI-USER uid="17376024"&gt;&lt;/LI-USER&gt;&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;You can try below code in vhost file. You can set the maxage for cache and refresh the data periodically.&lt;/EM&gt;&lt;/P&gt;
&lt;PRE&gt;&amp;lt;LocationMatch "^/content/.*\.test\.(?i:xml|css|tiff)$"&amp;gt;&lt;BR /&gt;    Header set Cache-Control "max-age=120,s-maxage=0,stale-while-revalidate=43200,stale-if-error=43200" "expr=%{REQUEST_STATUS} &amp;lt; 400"&lt;BR /&gt;    Header set Age 0&lt;BR /&gt;&amp;lt;/LocationMatch&amp;gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;EM&gt;If you need to clear the cache on page publish you can also do a event handler&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Aug 2022 12:57:58 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/dispatcher-cache-clear-strategy-for-service/m-p/541741#M134515</guid>
      <dc:creator>Jagadeesh_Prakash</dc:creator>
      <dc:date>2022-08-19T12:57:58Z</dc:date>
    </item>
    <item>
      <title>Re: Dispatcher cache clear strategy for service</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/dispatcher-cache-clear-strategy-for-service/m-p/541742#M134516</link>
      <description>&lt;P&gt;If you are using ACS Common then add a cache flush rule&lt;/P&gt;
&lt;P&gt;&lt;A href="https://adobe-consulting-services.github.io/acs-aem-commons/features/dispatcher-flush-rules/index.html" target="_blank"&gt;https://adobe-consulting-services.github.io/acs-aem-commons/features/dispatcher-flush-rules/index.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Aug 2022 12:59:31 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/dispatcher-cache-clear-strategy-for-service/m-p/541742#M134516</guid>
      <dc:creator>arunpatidar</dc:creator>
      <dc:date>2022-08-19T12:59:31Z</dc:date>
    </item>
    <item>
      <title>Re: Dispatcher cache clear strategy for service</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/dispatcher-cache-clear-strategy-for-service/m-p/541757#M134525</link>
      <description>&lt;P&gt;It would be good if you know when this call gives updated data. If you get updated data every 30 days then cache it on dispatcher.&lt;/P&gt;
&lt;P&gt;Below code cache xml calls for 12 hr&lt;SPAN&gt;. Add this code in vhost file.&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&amp;lt;LocationMatch "^/content/.*\.test\.(?i:xml)$"&amp;gt;
    Header set Cache-Control "max-age=120,s-maxage=0,stale-while-revalidate=43200,stale-if-error=43200" "expr=%{REQUEST_STATUS} &amp;lt; 400"
    Header set Age 0
&amp;lt;/LocationMatch&amp;gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Aug 2022 14:04:51 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/dispatcher-cache-clear-strategy-for-service/m-p/541757#M134525</guid>
      <dc:creator>HeenaMadan</dc:creator>
      <dc:date>2022-08-19T14:04:51Z</dc:date>
    </item>
    <item>
      <title>Re: Dispatcher cache clear strategy for service</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/dispatcher-cache-clear-strategy-for-service/m-p/541970#M134578</link>
      <description>&lt;P&gt;Thanks,&amp;nbsp;&lt;LI-USER uid="17379682"&gt;&lt;/LI-USER&gt;,&amp;nbsp;and&amp;nbsp;&lt;LI-USER uid="14968223"&gt;&lt;/LI-USER&gt;&amp;nbsp;for this solution.&amp;nbsp;&lt;BR /&gt;However, I feel the answer by&amp;nbsp;&lt;LI-USER uid="6786635"&gt;&lt;/LI-USER&gt;&amp;nbsp;seems the best fit here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For blogs and all, there will be no specific timeline for the addition of new content. I tried ACS Flush rules. It worked pretty fine, clearing cache only on particular hierarchy activation and it's so simple to implement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just clear cache as soon as new content comes with no time barrier, so I feel this solution is the best fit here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;LI-USER uid="5042721"&gt;&lt;/LI-USER&gt;&amp;nbsp;- Do you think ACS one could be accepted best solution here?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2022 07:38:14 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/dispatcher-cache-clear-strategy-for-service/m-p/541970#M134578</guid>
      <dc:creator>VinayHegde</dc:creator>
      <dc:date>2022-08-22T07:38:14Z</dc:date>
    </item>
  </channel>
</rss>

