<?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: Freemarker shows webscript response from cache in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/freemarker-shows-webscript-response-from-cache/m-p/266397#M219527</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Nope, no proxy.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Besides, what is cached is the node property. I tried including a timestamp in a webscript call, and then logging the timestamp and the property (along with the nodeRef).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So I tried the following: setting the property to "value1". Afterwards, I change it to "value2" with the same webscript I normally use.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then I call my original script directly (via URI) from one browser, and I get in the system log: &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;Timestamp: &amp;lt;date_and_time&amp;gt;, property value: "value2"&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Then I call the webscript from the other browser - and the second response is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;Timestamp: &amp;lt;new_date_and_time&amp;gt;, property value: "value1"&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;P.S. Lightbulbed on a point while writing this reply - I call the script with nodeRef argument, then use search.findNode(nodeRef); to get the document. Does that mean that I could be getting the prop value from lucene cache? But why isn't the cache cleared after the first call?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;P.P.S. Oh, and thanks for the reply. I'm getting totally crazy with this.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Dec 2010 15:06:45 GMT</pubDate>
    <dc:creator>zladuric</dc:creator>
    <dc:date>2010-12-08T15:06:45Z</dc:date>
    <item>
      <title>Freemarker shows webscript response from cache</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/freemarker-shows-webscript-response-from-cache/m-p/266394#M219524</link>
      <description>Hello, I have a similar problem to this one: http://forums.alfresco.com/en/viewtopic.php?f=36&amp;amp;t=20538&amp;amp;p=66938&amp;amp;hilit=cache#p66938I have a webscript which returns a json rendered based on a document property. Now, this works for some clients, and for some, not.The webscript itself is calle</description>
      <pubDate>Tue, 07 Dec 2010 15:53:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/freemarker-shows-webscript-response-from-cache/m-p/266394#M219524</guid>
      <dc:creator>zladuric</dc:creator>
      <dc:date>2010-12-07T15:53:47Z</dc:date>
    </item>
    <item>
      <title>Re: Freemarker shows webscript response from cache</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/freemarker-shows-webscript-response-from-cache/m-p/266395#M219525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Gets even weirder - when I read a custom prop from one browser, I get one (valid) value. When I do it AFTER that with the other browser, I get another (older) value.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And if I don't call the status-changing webscript (although I already done that), it'll always stay like that. It's like I have two different repositories!!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Dec 2010 00:10:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/freemarker-shows-webscript-response-from-cache/m-p/266395#M219525</guid>
      <dc:creator>zladuric</dc:creator>
      <dc:date>2010-12-08T00:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: Freemarker shows webscript response from cache</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/freemarker-shows-webscript-response-from-cache/m-p/266396#M219526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Do you have a proxy in the middle?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If the cache setting is applied appropriate then it should work, as it just sets the usual HTTP cache headers - examine them in FireBug or Fiddler or similar to see if they what you think they are!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kev&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Dec 2010 14:51:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/freemarker-shows-webscript-response-from-cache/m-p/266396#M219526</guid>
      <dc:creator>kevinr</dc:creator>
      <dc:date>2010-12-08T14:51:53Z</dc:date>
    </item>
    <item>
      <title>Re: Freemarker shows webscript response from cache</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/freemarker-shows-webscript-response-from-cache/m-p/266397#M219527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Nope, no proxy.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Besides, what is cached is the node property. I tried including a timestamp in a webscript call, and then logging the timestamp and the property (along with the nodeRef).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So I tried the following: setting the property to "value1". Afterwards, I change it to "value2" with the same webscript I normally use.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then I call my original script directly (via URI) from one browser, and I get in the system log: &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;Timestamp: &amp;lt;date_and_time&amp;gt;, property value: "value2"&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Then I call the webscript from the other browser - and the second response is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;Timestamp: &amp;lt;new_date_and_time&amp;gt;, property value: "value1"&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;P.S. Lightbulbed on a point while writing this reply - I call the script with nodeRef argument, then use search.findNode(nodeRef); to get the document. Does that mean that I could be getting the prop value from lucene cache? But why isn't the cache cleared after the first call?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;P.P.S. Oh, and thanks for the reply. I'm getting totally crazy with this.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Dec 2010 15:06:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/freemarker-shows-webscript-response-from-cache/m-p/266397#M219527</guid>
      <dc:creator>zladuric</dc:creator>
      <dc:date>2010-12-08T15:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: Freemarker shows webscript response from cache</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/freemarker-shows-webscript-response-from-cache/m-p/266398#M219528</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;The property values from node are always pulled from the NodeService, Lucene is used to retrieve Node *references* only - you would perhaps get a noderef back from Lucene that does not actually exist - but it would blow up immediately you tried to populate its properties - so an exists() call is needed in that case -&amp;nbsp; so that is not the issue you are seeing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I assume you are *not* running a cluster?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When you say "I get in the system log:" - are you logging output from your repository webscript to the console via the logger or do you mean "in the browser window"? (i'm just trying to rule out browser caching here, which I think we now have done)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would suggest you look using the NodeBrowser admin tool to see what the *actual* value of the node is before running the test again, that might help highlight something.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kev&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Dec 2010 15:22:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/freemarker-shows-webscript-response-from-cache/m-p/266398#M219528</guid>
      <dc:creator>kevinr</dc:creator>
      <dc:date>2010-12-08T15:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: Freemarker shows webscript response from cache</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/freemarker-shows-webscript-response-from-cache/m-p/266399#M219529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am not running a cluster, you're right.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, I am logging to the console via logger.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The actual value of a node is "value2" (the one that should be there). So why would I call a webscript twice and get different results is way beyond me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The actual use case is that some of inhouse users get this "status", based on which I show them an additional link in document-details. (The link is actually calling the other webscript - which changes the prop value and does other stuff.)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So for the same document in share, I get different possible values, and users get confused.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Dec 2010 16:11:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/freemarker-shows-webscript-response-from-cache/m-p/266399#M219529</guid>
      <dc:creator>zladuric</dc:creator>
      <dc:date>2010-12-08T16:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: Freemarker shows webscript response from cache</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/freemarker-shows-webscript-response-from-cache/m-p/266400#M219530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Just an update:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;logger.log("Tasks: "+args["timestamp"]+", user: "+person.properties.userName + ", nodeRef: "+args["nodeRef"]);&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;Results the same from various browsers in log, but I get different JSON output:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;11:35:08,885 User:admin DEBUG [repo.jscript.ScriptLogger] Tasks: null, user: admin, nodeRef: workspace://SpacesStore/382dd161-b0bd-471f-b170-87c2bbc51cf2&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;And the problem is, when I log a doc.properties[myCustomProp] - I get two different values. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Where can I look next?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Dec 2010 10:36:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/freemarker-shows-webscript-response-from-cache/m-p/266400#M219530</guid>
      <dc:creator>zladuric</dc:creator>
      <dc:date>2010-12-30T10:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: Freemarker shows webscript response from cache</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/freemarker-shows-webscript-response-from-cache/m-p/266401#M219531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Oh, and more fun this way:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;logger.log("Property: "+prop+",modified: "+doc.properties["cm:modified"]);&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;From firefox: (same user, same nodeRef)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;11:59:32,993 User:admin DEBUG [repo.jscript.ScriptLogger] Property: booking,modified: Thu Dec 30 2010 08:59:43 GMT+0100 (CET)&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;From Chrome:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;11:58:55,615 User:admin DEBUG [repo.jscript.ScriptLogger] Property: consulting,modified: Thu Dec 30 2010 08:59:43 GMT+0100 (CET)&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Dec 2010 11:02:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/freemarker-shows-webscript-response-from-cache/m-p/266401#M219531</guid>
      <dc:creator>zladuric</dc:creator>
      <dc:date>2010-12-30T11:02:44Z</dc:date>
    </item>
  </channel>
</rss>

