[geeklog-devel] New block on geeklog.net

Chris Franklin chris_s_franklin at yahoo.com
Sat Jan 24 22:33:09 EST 2004

Blaine -
Doesn't geeklog have a page caching mechanism?
This can be implemented many different ways but a simple way (to avoid using
cron tabs) would be to store the uri, cached uri, and validUntil timestamp.
Then have a component/object/function/whatever that you ask for the page. If
the cached version is valid, it passes that back, if not, it requests the
dynamic page and stores it (overwriting the cached page), then returns the
cached page uri.
I've implemented page caching on multiple sites for site-global data that
doesn't need to be real-time - it's quite easy and performance gains are
  -----Original Message-----
  From: geeklog-devel-admin at lists.geeklog.net
[mailto:geeklog-devel-admin at lists.geeklog.net]On Behalf Of Blaine Lang
  Sent: Saturday, January 24, 2004 5:08 PM
  To: geeklog-devel at lists.geeklog.net
  Subject: [geeklog-devel] New block on geeklog.net

  If you are in the development group on geeklog.net you will notice a new
block called quickstats. I added it to show some high level information of
the activity on the site. I noticed this morning that we had over 600
downloads in the last 24 hours and wanted to know what files were popular.

  This block now show the top 5 downloads as well as the total over the past
24hr window.
  It's adding 2-3 seconds to refresh the page now and I've added a couple
indexes but it still has a lot of records to crunch thru to calculate

  SELECT count(*) AS downloads,downloads.lid, filedetail.title FROM
{$_FM_TABLES['filemgmt_history']} downloads,
{$_FM_TABLES['filemgmt_filedetail']} filedetail WHERE filedetail.lid =
downloads.lid AND unix_timestamp(downloads.date )  + 86400 >
unix_timestamp(  ) GROUP  BY lid ORDER  BY downloads DESC LIMIT 5"

  Maybe someone can suggest a better SQL statement.
  I have indexes on lid (both tables) and date.

  If we can't make it run any faster and you want to disable it, then I can
enable it just for myself.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist8.pair.net/pipermail/geeklog-devel/attachments/20040124/ef1fd868/attachment.html>

More information about the geeklog-devel mailing list