Changeset 17888

Show
Ignore:
Timestamp:
10/03/08 12:12:19 (2 months ago)
Author:
rambo
Message:

forward port r17887

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/midcom/midcom.core/midcom/services/cache/module/content.php

    r17556 r17888  
    947947 
    948948        $cache_data = ob_get_contents(); 
     949        /** 
     950         * WARNING:  
     951         *   From here on anything added to content is not included in cached 
     952         *   data, so make sure nothing content-wise is added after this  
     953         */ 
    949954 
    950955        // Generate E-Tag header. 
     
    967972        $this->register_sent_header($header); 
    968973        $this->_complete_sent_headers($cache_data); 
     974 
     975        // If-Modified-Since / If-None-Match checks, if no match, flush the output. 
     976        if (! $this->_check_not_modified($this->_last_modified, $etag)) 
     977        { 
     978            ob_end_flush(); 
     979            $this->_obrunning = false; 
     980        } 
     981 
     982        /** 
     983         * WARNING:  
     984         *   Stuff below here is executed *after* we have flushed output, 
     985         *   so here we should only write out our caches but do nothing else 
     986         */ 
    969987 
    970988        if ($this->_uncached) 
     
    9831001            $this->write_meta_cache($content_id, $etag); 
    9841002            $this->_data_cache->put($content_id, $cache_data); 
    985         } 
    986  
    987         // Finish caching. 
    988         // If-Modified-Since / If-None-Match checks, if no match, flush the output. 
    989         if (! $this->_check_not_modified($this->_last_modified, $etag)) 
    990         { 
    991             ob_end_flush(); 
    992             $this->_obrunning = false; 
    9931003        } 
    9941004    }