Changeset 631

Show
Ignore:
Timestamp:
10/12/06 15:46:20 (2 years ago)
Author:
sven
Message:

magpie: make elgg's magpie more cache-friendly even if upstream isn't

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • devel/units/magpie/rss_fetch.inc

    r393 r631  
    154154        if ( $cache_status == 'STALE' ) { 
    155155            $rss = $cache->get( $cache_key ); 
    156             if ( $rss and $rss->etag and $rss->last_modified ) { 
    157                 $request_headers['If-None-Match'] = $rss->etag; 
    158                 $request_headers['If-Last-Modified'] = $rss->last_modified; 
     156            if ( $rss ) { 
     157                if ( $rss->etag ) { 
     158                    $request_headers['If-None-Match'] = $rss->etag; 
     159                } 
     160                if ( $rss->last_modified ) { 
     161                    $request_headers['If-Last-Modified'] = $rss->last_modified; 
     162                } 
    159163            } 
    160164        }