Changeset 1768

Show
Ignore:
Timestamp:
10/19/07 17:00:43 (14 months ago)
Author:
cfriesen
Message:

This should do what I meant to do.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/gregarius/extlib/rss_dbcache.inc

    r1767 r1768  
    117117         
    118118          // Lets hope that the web server and sql server have their clocks in sync 
    119         $age = time() - $dateRefreshed; 
     119        $age = (time() - $dateRefreshed) / 60; 
    120120         
    121121                if (!$refreshInterval || ($refreshInterval <= 60)) { 
    122122            // We should change the Gregarius UA if we allow refreshInterval to be small 
    123123            $refreshInterval = $this->MAX_AGE; 
    124         } else { 
    125                     $refreshInterval = $refreshInterval * 60; 
    126124                } 
    127125 
    128                 setProperty($cid, 'rss.config.refreshdate', 'feed', $dateRefreshed); 
     126                setProperty($cid, 'rss.config.refreshdate', 'feed', time()); 
    129127 
    130         if ( $refreshInterval >= $age ) { 
     128        if ( $refreshInterval > $age ) { 
    131129            // object exists and is current 
    132                         print("HIT"); 
    133130            return 'HIT'; 
    134131        } else { 
    135132            // object exists but is old 
    136                         print("STALE"); 
    137133            return 'STALE'; 
    138134        }