<?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 Re: Share WebScripts cache problem in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/share-webscripts-cache-problem/m-p/300237#M253367</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I allow myself to reboot this topic because this cache issue really bothers me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I encounter the same problem dealing with user preferences : when I do an action that changes the user preferences, navigate to another page, and use the go back button the page displays with the old user preferences. When I refresh this page, the preferences are well refreshed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For each screen that need to retrieve some user preferences, these are retrieved from the preference Surf root object (or the Alfresco.constants.USERPREFERENCES, that is the same thing) and loaded in the page. Using the back button loads a cached version of the page including the old version of the preferences…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What I would like to do is simply refresh these preferences when I go back on a page. What is the best way to achieve this ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- dealing with page cache ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- load the preferences with an Ajax request on each components that needs it (that is to say more than once in a single page…) ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- another idea ??&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Jun 2014 14:15:52 GMT</pubDate>
    <dc:creator>tonyrivet</dc:creator>
    <dc:date>2014-06-19T14:15:52Z</dc:date>
    <item>
      <title>Share WebScripts cache problem</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/share-webscripts-cache-problem/m-p/300232#M253362</link>
      <description>Hi,I'm stuck with a very annoying problem caused by Surf WebSripts displaying cached response when going back on a page.Let's explain the problem with an example : I have a custom action on the document details page that changes some document properties. This action ends refreshing the document meta</description>
      <pubDate>Mon, 19 May 2014 09:38:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/share-webscripts-cache-problem/m-p/300232#M253362</guid>
      <dc:creator>tonyrivet</dc:creator>
      <dc:date>2014-05-19T09:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: Share WebScripts cache problem</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/share-webscripts-cache-problem/m-p/300233#M253363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Tony, I might not have understood your flow properly, But metadata/properties that you are retrieving that must be your alfresco data webscript, You can control caching from there.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 05:33:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/share-webscripts-cache-problem/m-p/300233#M253363</guid>
      <dc:creator>niketapatel</dc:creator>
      <dc:date>2014-05-20T05:33:30Z</dc:date>
    </item>
    <item>
      <title>Re: Share WebScripts cache problem</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/share-webscripts-cache-problem/m-p/300234#M253364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi and thank you for your answer,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As far as I know, the caching problem really comes from the presentation WebScript.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When you use your browser's go back button, it displays a cache version of the presentation WebScripts response. It does not even execute the presentation WebScript JS controlers, and so does not retrieve the data from the repo…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This can also be reproduced with a native Alfresco on a document details page :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- use the "Manage Aspect" actions to add the "Categorizable" aspect&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- notice that the "Categories" property has been added to the metadata view form&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- navigate to another page (the "Manage permissions" page for example) and go back to the details page&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- notice that the "Categories" property is not shown anymore&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- refresh the page&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- notice that the "Categories" property is displayed again&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 07:22:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/share-webscripts-cache-problem/m-p/300234#M253364</guid>
      <dc:creator>tonyrivet</dc:creator>
      <dc:date>2014-05-20T07:22:00Z</dc:date>
    </item>
    <item>
      <title>Re: Share WebScripts cache problem</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/share-webscripts-cache-problem/m-p/300235#M253365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Tony, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, Got it. I followed your steps and I can reproduce it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To Solve Presentation webscript caching issue, You can try "noCache= + new Date().getTime()" parameter in your presentation script.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried this noCache parameter to solve the scenario you gave for document metadata issue after adding/removing aspect and it;s working.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I appended noCache para in Document metadata URL and it always fetch new data NOT cached data.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;url: Alfresco.constants.URL_SERVICECONTEXT + "components/form?noCache=" + new Date().getTime(),&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope it works!&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 05:36:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/share-webscripts-cache-problem/m-p/300235#M253365</guid>
      <dc:creator>niketapatel</dc:creator>
      <dc:date>2014-05-22T05:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: Share WebScripts cache problem</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/share-webscripts-cache-problem/m-p/300236#M253366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, your solution definitely works for the document metadata case, because the metadata form is loaded dynamically from the document-metadata.js component (it is not registered in the cached page)… and that's a first step, thank you !&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But it doesn't work to refresh the main presentation webscripts response, I mean the ones declared as components in the page template-instance definition file. I tried to add the noCache parameter in the component definition but it doesn't work, and it seems quite normal to me : as the whole page is cached, with all its components, I don't think it is possible to force only one component to refresh.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe it is possible to force one specific page to ignore cache ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The best solution would be to refresh the cached page when I dynamically refresh one of its components, but I don't know if it is possible without refreshing the whole page…?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 09:54:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/share-webscripts-cache-problem/m-p/300236#M253366</guid>
      <dc:creator>tonyrivet</dc:creator>
      <dc:date>2014-05-22T09:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: Share WebScripts cache problem</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/share-webscripts-cache-problem/m-p/300237#M253367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I allow myself to reboot this topic because this cache issue really bothers me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I encounter the same problem dealing with user preferences : when I do an action that changes the user preferences, navigate to another page, and use the go back button the page displays with the old user preferences. When I refresh this page, the preferences are well refreshed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For each screen that need to retrieve some user preferences, these are retrieved from the preference Surf root object (or the Alfresco.constants.USERPREFERENCES, that is the same thing) and loaded in the page. Using the back button loads a cached version of the page including the old version of the preferences…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What I would like to do is simply refresh these preferences when I go back on a page. What is the best way to achieve this ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- dealing with page cache ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- load the preferences with an Ajax request on each components that needs it (that is to say more than once in a single page…) ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- another idea ??&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jun 2014 14:15:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/share-webscripts-cache-problem/m-p/300237#M253367</guid>
      <dc:creator>tonyrivet</dc:creator>
      <dc:date>2014-06-19T14:15:52Z</dc:date>
    </item>
  </channel>
</rss>

