<?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: Responding with a pre-processed webscript in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/responding-with-a-pre-processed-webscript/m-p/183917#M137047</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm trying to think along here, so please bear with me &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://connect.hyland.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You want the total response from your webscript (which is javascript + FTL) to be cached right? You would probably be easier off by using a Java filter (which would simply block the request going into alfresco), which would be massively faster but not so easy to access the repository because you'd have to use the Java API. Another advantage is that your webscripts are much simpler, as they are cached by an external entity.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Alternatively, you'd need to have an FTL template looking like&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;${entire-page!""}&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;where in javascript you use&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;model.entire-page = htmlCheck.content;&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, 26 Feb 2009 06:51:11 GMT</pubDate>
    <dc:creator>rogier_oudshoor</dc:creator>
    <dc:date>2009-02-26T06:51:11Z</dc:date>
    <item>
      <title>Responding with a pre-processed webscript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/responding-with-a-pre-processed-webscript/m-p/183916#M137046</link>
      <description>My site currently depends on webscripts to build all its pages, what I'm trying to do is have each webscript save a static version of the page it generates into the alfresco respository, and successive requests for that webscript will respond with the static page it gernerated if it exists. This wil</description>
      <pubDate>Wed, 25 Feb 2009 23:56:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/responding-with-a-pre-processed-webscript/m-p/183916#M137046</guid>
      <dc:creator>jvanderhoef</dc:creator>
      <dc:date>2009-02-25T23:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: Responding with a pre-processed webscript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/responding-with-a-pre-processed-webscript/m-p/183917#M137047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm trying to think along here, so please bear with me &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://connect.hyland.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You want the total response from your webscript (which is javascript + FTL) to be cached right? You would probably be easier off by using a Java filter (which would simply block the request going into alfresco), which would be massively faster but not so easy to access the repository because you'd have to use the Java API. Another advantage is that your webscripts are much simpler, as they are cached by an external entity.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Alternatively, you'd need to have an FTL template looking like&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;${entire-page!""}&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;where in javascript you use&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;model.entire-page = htmlCheck.content;&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, 26 Feb 2009 06:51:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/responding-with-a-pre-processed-webscript/m-p/183917#M137047</guid>
      <dc:creator>rogier_oudshoor</dc:creator>
      <dc:date>2009-02-26T06:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: Responding with a pre-processed webscript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/responding-with-a-pre-processed-webscript/m-p/183918#M137048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You know you can cache webscript responses. See &lt;/SPAN&gt;&lt;A href="http://wiki.alfresco.com/wiki/Web_Scripts#Caching" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/Web_Scripts#Caching&lt;/A&gt;&lt;SPAN&gt;. Use Squid as a reverse proxy to cache your web script responses. See &lt;/SPAN&gt;&lt;A href="http://www.visolve.com/squid/whitepapers/reverseproxy.php" rel="nofollow noopener noreferrer"&gt;http://www.visolve.com/squid/whitepapers/reverseproxy.php&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Feb 2009 10:44:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/responding-with-a-pre-processed-webscript/m-p/183918#M137048</guid>
      <dc:creator>zaizi</dc:creator>
      <dc:date>2009-02-26T10:44:17Z</dc:date>
    </item>
    <item>
      <title>Re: Responding with a pre-processed webscript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/responding-with-a-pre-processed-webscript/m-p/183919#M137049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Using the built in caching method with webscripts is not really an optimal solution for me since it uses HTTP caching, I need server side caching to happen, still considering using OScache, but that is another discussion. The Java filter sounds like a winner but I'm not a developer per say, more of a front-end guy, but I'll pass that idea along to my developer friend and see what he thinks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'll explain the process I'm exploring a bit more:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have 30-40 webscripts that generate pages and content. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When a user hits a page on the site the&amp;nbsp; webscript is fired and returns the page to the user, some of these take awhile to load due to the mass amount of information it is looking through.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What I'm trying to do is to see if when a webscript is called, it can be "baked" as a static page in alfresco, and any successive requests for that webscript will return the "baked" version. This would improve performance for &lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;anyone &lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN&gt;who requests that page, and the entire site would end up being faster as all the webscripts get "baked". Then if I update content within alfresco I can just go delete the "baked" page and it would get regenerated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your input, I know there are many ways to improvement of the performance of the site using alfresco, just exploring this one at the moment.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Feb 2009 13:40:01 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/responding-with-a-pre-processed-webscript/m-p/183919#M137049</guid>
      <dc:creator>jvanderhoef</dc:creator>
      <dc:date>2009-02-26T13:40:01Z</dc:date>
    </item>
  </channel>
</rss>

