ummm... huh! that was pretty stupid of me :)

but the idea is still salvageble. we're aiming for the common case - extream cases can default and still go hit the DB, after missing the cache.

what I'm thinking of is have an incremental cache, starting with the latest post, and going back, up to a day back. Then, when a client is asking for "show me the newest nodes in the last 10 mintues", the cache process just scans the flat file on the webserver, stopping when it is father back than 10 minutes, and shows the collected data. Of course, if it reaches the end of the cache, and still doesn't reach far enough back, then it just defaults to the current behaviour. Performance hit to that user, but that's the rare case.

sample data could look like this:

1044638805|sopw|How do I download a file?|Anonimous Monk 1044638800|sopw|How do I get my script to run?|Newbie 1044638523|med|Pondering the meaning of perl|Phil ...

yes, the cache process would put some load on the web servers, but from what I understand we can afford that load, and it would defenitly reduce the load on the database, because the cache would only have to be updated once in a while

does this make any more sense now?

-- zigdon


In reply to (z) Re^4: Newest Nodes Page by zigdon
in thread Newest Nodes Page by batkins

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.