You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Kevac Marko <ma...@kevac.org> on 2010/03/08 15:37:18 UTC

r->connection->aborted in mod_disk_cache and mod_mem_cache

Hello. Why this code is presented in disk cache, but not in mem cache?

        if (r->connection->aborted || r->no_cache) {
            ap_log_error(APLOG_MARK, APLOG_INFO, 0, r->server,
                         "disk_cache: Discarding body for URL %s "
                         "because connection has been aborted.",
                         h->cache_obj->key);
            /* Remove the intermediate cache file and return non-APR_SUCCESS */
            file_cache_errorcleanup(dobj, r);
            return APR_EGENERAL;
        }

-- 
Marko Kevac

Re: r->connection->aborted in mod_disk_cache and mod_mem_cache

Posted by Graham Leggett <mi...@sharp.fm>.
On 08 Mar 2010, at 4:37 PM, Kevac Marko wrote:

> Hello. Why this code is presented in disk cache, but not in mem cache?
>
>        if (r->connection->aborted || r->no_cache) {
>            ap_log_error(APLOG_MARK, APLOG_INFO, 0, r->server,
>                         "disk_cache: Discarding body for URL %s "
>                         "because connection has been aborted.",
>                         h->cache_obj->key);
>            /* Remove the intermediate cache file and return non- 
> APR_SUCCESS */
>            file_cache_errorcleanup(dobj, r);
>            return APR_EGENERAL;
>        }

The mem cache hasn't received the same level of attention is the disk  
cache did, and due to the OS typically backing the disk with a memory  
cache anyway, there wasn't much that mem cache did that disk cache  
didn't already do anyway. As a result, mem cache was removed from what  
is to become v2.4.

That said, if it fixes a bug in v2.2, it can definitely be proposed  
for inclusion.

Regards,
Graham
--