Changeset 1516

Show
Ignore:
Timestamp:
07/05/06 22:41:43 (2 years ago)
Author:
mbonetti
Message:

EXPERIMENTAL: store the last update date in the properties table, instead of
running a pointless query.

Location:
trunk/gregarius
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/gregarius/cls/update.php

    r1489 r1516  
    105105            } 
    106106        } 
     107         
     108        setProperty('__meta__','meta.lastupdate','misc',time()); 
     109         
    107110        if (count($newIds) > 0) { 
    108111            rss_invalidate_cache(); 
     
    167170        rss_set_hook('rss.plugins.bodystart', "pushHeaderCallBack"); 
    168171        rss_set_hook('rss.plugins.bodyend', "pushFooterCallBack"); 
     172         
     173        ob_implicit_flush(); 
    169174    } 
    170175 
     
    396401    echo "\n".PUSH_BOUNDARY."\n"; 
    397402    echo "Content-Type: text/html\n\n"; 
     403    flush(); 
    398404} 
    399405 
     
    412418    echo "\n".PUSH_BOUNDARY."\n"; 
    413419    echo "WARNING: YOUR BROWSER DOESN'T SUPPORT THIS SERVER-PUSH TECHNOLOGY.\n"; 
     420     
     421    flush(); 
    414422} 
    415423 
  • trunk/gregarius/util.php

    r1496 r1516  
    3030 
    3131function getLastModif() { 
    32     static $ret; 
    33     if ($ret == 0) { 
    34         $res = rss_query("select unix_timestamp(max(added)) as max_added from ".getTable("item")); 
    35         list ($ret) = rss_fetch_row($res); 
    36     } 
    37     return $ret; 
     32    return getProperty('__meta__','meta.lastupdate'); 
    3833} 
    3934