title: Funky caching versus Memcache versus...?
body: <p>I'm working on a site that has an old, cgi+perl based embeddable widget. We're bringing the widget up to speed, and I was wondering about what patterns/methods to use for caching and if people knew of some method other than the two that I was thinking of:</p>
  
  <ol>
  <li>Funky caching: the widgets have setting held in get params, and using rewrites we were going to have PHP create the file if it doesn't exist; Apache would then serve that file for subsequent requests until cron cleans it out.</li>
  <li>Memcache/d: PHP can store the result in Memcache which apache could pull from the daemon (I presume). I imagine this could be done, but am uncertain at the moment about file/type and headers etc. </li>
  </ol>
  
  <p>I've used #1 on many occasion, and #2 sounds like it could be an interesting alternative (if it can be done). Are there other good alternatives in this case? We're on a standard LAMP dedicated server.</p>
  
  <p>The goal is to minimize server load when larger sites embed the widget (something we have been dealing with)...</p>
  
  <p><strong>Added/Conclusion</strong></p>
  
  <p>Okay, while I appreciate Piontek's effort at a solution, it would seem there's not much else out there (that anybody has shared). What we have realized though, is that the most efficient manner to handle this will be to gen one file only and have the client-side handle the get params and logic that builds the resulting widget. </p>