<br><br><div class="gmail_quote">On Sun, Jan 17, 2010 at 11:35 PM, Dami Laurent (PJ) <span dir="ltr">&lt;<a href="mailto:laurent.dami@justice.ge.ch">laurent.dami@justice.ge.ch</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<br><div class="im"><br>
<br>
</div>Indeed, this is exactly what I want to do. The app has a config file (not a Catalyst<br>
config file, but another file having to do with business logic), and some super-users<br>
have a mechanism for hot uploading of a new config to the server, at any time.<br>
A few app pages are expensive to compute, and they depend on the client and on that config file. So clients should keep asking for those pages at each request, and depending on the If-Modified-Since header and on the timestamp for the config file, the server can decide if it&#39;s worth recomputing the page for that client, or rather send a cheap 304 Not Modified.<br>

</blockquote><div><br>Be careful about using timestamps if you are running multiple web servers behind a load balancer (or may expand to where you will be behind a balancer).  Here&#39;s a read on Etags:<br><br> <a href="http://developer.yahoo.net/blog/archives/2007/07/high_performanc_11.html">http://developer.yahoo.net/blog/archives/2007/07/high_performanc_11.html</a><br>

<br>For resources such as css, js, images I tend to create URLs that include an md5.  Those include cache headers that don&#39;t expire and thus when the content changes the URL changes.  <br><br>I have also done that with text/html pages, but it&#39;s less common.  For a config file you can send the config through Object::Signature to get an md5.  You could recalculate and cache that whenever a new config is uploaded.<br>

<br>For &quot;static&quot; pages (for non-logged in users) the pages tend to get cached for some number of minutes as it&#39;s not critical that a change is seen exactly the same time by all users.  Dynamic content is not cached, of course, but elements of the page may be cached in memcached.<br>

</div><div><br> </div></div><br>-- <br>Bill Moseley<br><a href="mailto:moseley@hank.org">moseley@hank.org</a><br>