mod_cache_socache.html.en revision 04e37a05e8fe2c057cfcc546f382d99fa79894c0
6ae232055d4d8a97267517c5e50074c2c819941and<?xml version="1.0" encoding="ISO-8859-1"?>
6ae232055d4d8a97267517c5e50074c2c819941and<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
6ae232055d4d8a97267517c5e50074c2c819941and<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
6ae232055d4d8a97267517c5e50074c2c819941and XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
6ae232055d4d8a97267517c5e50074c2c819941and This file is generated from xml source: DO NOT EDIT
6ae232055d4d8a97267517c5e50074c2c819941and XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
6ae232055d4d8a97267517c5e50074c2c819941and -->
6ae232055d4d8a97267517c5e50074c2c819941and<title>mod_cache_socache - Apache HTTP Server</title>
6ae232055d4d8a97267517c5e50074c2c819941and<link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
6ae232055d4d8a97267517c5e50074c2c819941and<link href="/style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen<link href="/style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="/style/css/prettify.css" />
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen<script src="/style/scripts/prettify.js" type="text/javascript">
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen</script>
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen
6ae232055d4d8a97267517c5e50074c2c819941and<link href="/images/favicon.ico" rel="shortcut icon" /></head>
6ae232055d4d8a97267517c5e50074c2c819941and<body>
d229f940abfb2490dee17979e9a5ff31b7012eb5rbowen<div id="page-header">
3f08db06526d6901aa08c110b5bc7dde6bc39905nd<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/quickreference.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p>
6ae232055d4d8a97267517c5e50074c2c819941and<p class="apache">Apache HTTP Server Version 2.5</p>
6ae232055d4d8a97267517c5e50074c2c819941and<img alt="" src="/images/feather.gif" /></div>
6ae232055d4d8a97267517c5e50074c2c819941and<div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="/images/left.gif" /></a></div>
b43f840409794ed298e8634f6284741f193b6c4ftakashi<div id="path">
6ae232055d4d8a97267517c5e50074c2c819941and<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.5</a> &gt; <a href="./">Modules</a></div>
b43f840409794ed298e8634f6284741f193b6c4ftakashi<div id="page-content">
c04f76acce77126cf88b09350e56ea8c6b4a064enilgun<div id="preamble"><h1>Apache Module mod_cache_socache</h1>
6ae232055d4d8a97267517c5e50074c2c819941and<div class="toplang">
91f378b5a10f2d83820902ed10ba7967a3920c18nilgun<p><span>Available Languages: </span><a href="/en/mod/mod_cache_socache.html" title="English">&nbsp;en&nbsp;</a> |
f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654rjung<a href="/fr/mod/mod_cache_socache.html" hreflang="fr" rel="alternate" title="Fran�ais">&nbsp;fr&nbsp;</a></p>
6ae232055d4d8a97267517c5e50074c2c819941and</div>
b43f840409794ed298e8634f6284741f193b6c4ftakashi<table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Shared object cache (socache) based storage module for the
b43f840409794ed298e8634f6284741f193b6c4ftakashiHTTP caching filter.</td></tr>
b43f840409794ed298e8634f6284741f193b6c4ftakashi<tr><th><a href="module-dict.html#Status">Status:</a></th><td>Extension</td></tr>
b43f840409794ed298e8634f6284741f193b6c4ftakashi<tr><th><a href="module-dict.html#ModuleIdentifier">Module�Identifier:</a></th><td>cache_socache_module</td></tr>
6ae232055d4d8a97267517c5e50074c2c819941and<tr><th><a href="module-dict.html#SourceFile">Source�File:</a></th><td>mod_cache_socache.c</td></tr></table>
6ae232055d4d8a97267517c5e50074c2c819941and<h3>Summary</h3>
6ae232055d4d8a97267517c5e50074c2c819941and
6ae232055d4d8a97267517c5e50074c2c819941and <p><code class="module"><a href="/mod/mod_cache_socache.html">mod_cache_socache</a></code> implements a shared object cache
6ae232055d4d8a97267517c5e50074c2c819941and (socache) based storage manager for <code class="module"><a href="/mod/mod_cache.html">mod_cache</a></code>.</p>
6ae232055d4d8a97267517c5e50074c2c819941and
6ae232055d4d8a97267517c5e50074c2c819941and <p>The headers and bodies of cached responses are combined, and stored
6ae232055d4d8a97267517c5e50074c2c819941and underneath a single key in the shared object cache. A
6ae232055d4d8a97267517c5e50074c2c819941and <a href="/socache.html">number of implementations</a> of shared object
6ae232055d4d8a97267517c5e50074c2c819941and caches are available to choose from.</p>
6ae232055d4d8a97267517c5e50074c2c819941and
6ae232055d4d8a97267517c5e50074c2c819941and <p>Multiple content negotiated responses can be stored concurrently,
6ae232055d4d8a97267517c5e50074c2c819941and however the caching of partial content is not yet supported by this
6ae232055d4d8a97267517c5e50074c2c819941and module.</p>
6ae232055d4d8a97267517c5e50074c2c819941and
6ae232055d4d8a97267517c5e50074c2c819941and <pre class="prettyprint lang-config">
6ae232055d4d8a97267517c5e50074c2c819941and# Turn on caching
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedoohCacheSocache shmcb
6ae232055d4d8a97267517c5e50074c2c819941andCacheSocacheMaxSize 102400
6ae232055d4d8a97267517c5e50074c2c819941and&lt;Location /foo&gt;
6ae232055d4d8a97267517c5e50074c2c819941and CacheEnable socache
6ae232055d4d8a97267517c5e50074c2c819941and&lt;/Location&gt;
6ae232055d4d8a97267517c5e50074c2c819941and
6ae232055d4d8a97267517c5e50074c2c819941and# Fall back to the disk cache
6ae232055d4d8a97267517c5e50074c2c819941andCacheSocache shmcb
6ae232055d4d8a97267517c5e50074c2c819941andCacheSocacheMaxSize 102400
6ae232055d4d8a97267517c5e50074c2c819941and&lt;Location /foo&gt;
6ae232055d4d8a97267517c5e50074c2c819941and CacheEnable socache
6ae232055d4d8a97267517c5e50074c2c819941and CacheEnable disk
6ae232055d4d8a97267517c5e50074c2c819941and&lt;/Location&gt;
6ae232055d4d8a97267517c5e50074c2c819941and </pre>
6ae232055d4d8a97267517c5e50074c2c819941and
6ae232055d4d8a97267517c5e50074c2c819941and
6ae232055d4d8a97267517c5e50074c2c819941and <div class="note"><h3>Note:</h3>
6ae232055d4d8a97267517c5e50074c2c819941and <p><code class="module"><a href="/mod/mod_cache_socache.html">mod_cache_socache</a></code> requires the services of
6ae232055d4d8a97267517c5e50074c2c819941and <code class="module"><a href="/mod/mod_cache.html">mod_cache</a></code>, which must be loaded before
6ae232055d4d8a97267517c5e50074c2c819941and mod_cache_socache.</p>
6ae232055d4d8a97267517c5e50074c2c819941and </div>
6ae232055d4d8a97267517c5e50074c2c819941and</div>
6ae232055d4d8a97267517c5e50074c2c819941and<div id="quickview"><h3 class="directives">Directives</h3>
6ae232055d4d8a97267517c5e50074c2c819941and<ul id="toc">
6ae232055d4d8a97267517c5e50074c2c819941and<li><img alt="" src="/images/down.gif" /> <a href="#cachesocache">CacheSocache</a></li>
6ae232055d4d8a97267517c5e50074c2c819941and<li><img alt="" src="/images/down.gif" /> <a href="#cachesocachemaxsize">CacheSocacheMaxSize</a></li>
6ae232055d4d8a97267517c5e50074c2c819941and<li><img alt="" src="/images/down.gif" /> <a href="#cachesocachemaxtime">CacheSocacheMaxTime</a></li>
6ae232055d4d8a97267517c5e50074c2c819941and<li><img alt="" src="/images/down.gif" /> <a href="#cachesocachemintime">CacheSocacheMinTime</a></li>
6ae232055d4d8a97267517c5e50074c2c819941and<li><img alt="" src="/images/down.gif" /> <a href="#cachesocachereadsize">CacheSocacheReadSize</a></li>
6ae232055d4d8a97267517c5e50074c2c819941and<li><img alt="" src="/images/down.gif" /> <a href="#cachesocachereadtime">CacheSocacheReadTime</a></li>
6ae232055d4d8a97267517c5e50074c2c819941and</ul>
6ae232055d4d8a97267517c5e50074c2c819941and<h3>See also</h3>
6ae232055d4d8a97267517c5e50074c2c819941and<ul class="seealso">
6ae232055d4d8a97267517c5e50074c2c819941and<li><code class="module"><a href="/mod/mod_cache.html">mod_cache</a></code></li>
6ae232055d4d8a97267517c5e50074c2c819941and<li><code class="module"><a href="/mod/mod_cache_disk.html">mod_cache_disk</a></code></li>
6ae232055d4d8a97267517c5e50074c2c819941and<li><a href="/caching.html">Caching Guide</a></li>
6ae232055d4d8a97267517c5e50074c2c819941and</ul><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div>
6ae232055d4d8a97267517c5e50074c2c819941and
6ae232055d4d8a97267517c5e50074c2c819941and<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
6ae232055d4d8a97267517c5e50074c2c819941and<div class="directive-section"><h2><a name="CacheSocache" id="CacheSocache">CacheSocache</a> <a name="cachesocache" id="cachesocache">Directive</a></h2>
6ae232055d4d8a97267517c5e50074c2c819941and<table class="directive">
6ae232055d4d8a97267517c5e50074c2c819941and<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The shared object cache implementation to use</td></tr>
6ae232055d4d8a97267517c5e50074c2c819941and<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CacheSocache <var>type[:args]</var></code></td></tr>
6ae232055d4d8a97267517c5e50074c2c819941and<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
6ae232055d4d8a97267517c5e50074c2c819941and<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
6ae232055d4d8a97267517c5e50074c2c819941and<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_cache_socache</td></tr>
6ae232055d4d8a97267517c5e50074c2c819941and<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.5 and later</td></tr>
6ae232055d4d8a97267517c5e50074c2c819941and</table>
6ae232055d4d8a97267517c5e50074c2c819941and <p>The <code class="directive">CacheSocache</code> directive defines the name of
6ae232055d4d8a97267517c5e50074c2c819941and the shared object cache implementation to use, followed by optional
6ae232055d4d8a97267517c5e50074c2c819941and arguments for that implementation. A <a href="/socache.html">number of
6ae232055d4d8a97267517c5e50074c2c819941and implementations</a> of shared object caches are available to choose
6ae232055d4d8a97267517c5e50074c2c819941and from.</p>
6ae232055d4d8a97267517c5e50074c2c819941and
6ae232055d4d8a97267517c5e50074c2c819941and <pre class="prettyprint lang-config">
6ae232055d4d8a97267517c5e50074c2c819941and CacheSocache shmcb
6ae232055d4d8a97267517c5e50074c2c819941and </pre>
6ae232055d4d8a97267517c5e50074c2c819941and
6ae232055d4d8a97267517c5e50074c2c819941and
6ae232055d4d8a97267517c5e50074c2c819941and</div>
6ae232055d4d8a97267517c5e50074c2c819941and<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
6ae232055d4d8a97267517c5e50074c2c819941and<div class="directive-section"><h2><a name="CacheSocacheMaxSize" id="CacheSocacheMaxSize">CacheSocacheMaxSize</a> <a name="cachesocachemaxsize" id="cachesocachemaxsize">Directive</a></h2>
6ae232055d4d8a97267517c5e50074c2c819941and<table class="directive">
6ae232055d4d8a97267517c5e50074c2c819941and<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The maximum size (in bytes) of an entry to be placed in the
6ae232055d4d8a97267517c5e50074c2c819941andcache</td></tr>
6ae232055d4d8a97267517c5e50074c2c819941and<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CacheSocacheMaxSize <var>bytes</var></code></td></tr>
6ae232055d4d8a97267517c5e50074c2c819941and<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>CacheSocacheMaxSize 102400</code></td></tr>
6ae232055d4d8a97267517c5e50074c2c819941and<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
6ae232055d4d8a97267517c5e50074c2c819941and<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
6ae232055d4d8a97267517c5e50074c2c819941and<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_cache_socache</td></tr>
6ae232055d4d8a97267517c5e50074c2c819941and<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.5 and later</td></tr>
6ae232055d4d8a97267517c5e50074c2c819941and</table>
6ae232055d4d8a97267517c5e50074c2c819941and <p>The <code class="directive">CacheSocacheMaxSize</code> directive sets the
6ae232055d4d8a97267517c5e50074c2c819941and maximum size, in bytes, for the combined headers and body of a document
6ae232055d4d8a97267517c5e50074c2c819941and to be considered for storage in the cache. The larger the headers that
6ae232055d4d8a97267517c5e50074c2c819941and are stored alongside the body, the smaller the body may be.</p>
6ae232055d4d8a97267517c5e50074c2c819941and
6ae232055d4d8a97267517c5e50074c2c819941and <p>The <code class="module"><a href="/mod/mod_cache_socache.html">mod_cache_socache</a></code> module will only attempt to
6ae232055d4d8a97267517c5e50074c2c819941and cache responses that have an explicit content length, or that are small
6ae232055d4d8a97267517c5e50074c2c819941and enough to be written in one pass. This is done to allow the
6ae232055d4d8a97267517c5e50074c2c819941and <code class="module"><a href="/mod/mod_cache_disk.html">mod_cache_disk</a></code> module to have an opportunity to cache
6ae232055d4d8a97267517c5e50074c2c819941and responses larger than those cacheable within
6ae232055d4d8a97267517c5e50074c2c819941and <code class="module"><a href="/mod/mod_cache_socache.html">mod_cache_socache</a></code>.</p>
6ae232055d4d8a97267517c5e50074c2c819941and
6ae232055d4d8a97267517c5e50074c2c819941and <pre class="prettyprint lang-config">
6ae232055d4d8a97267517c5e50074c2c819941and CacheSocacheMaxSize 102400
6ae232055d4d8a97267517c5e50074c2c819941and </pre>
6ae232055d4d8a97267517c5e50074c2c819941and
6ae232055d4d8a97267517c5e50074c2c819941and
6ae232055d4d8a97267517c5e50074c2c819941and</div>
6ae232055d4d8a97267517c5e50074c2c819941and<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
6ae232055d4d8a97267517c5e50074c2c819941and<div class="directive-section"><h2><a name="CacheSocacheMaxTime" id="CacheSocacheMaxTime">CacheSocacheMaxTime</a> <a name="cachesocachemaxtime" id="cachesocachemaxtime">Directive</a></h2>
6ae232055d4d8a97267517c5e50074c2c819941and<table class="directive">
6ae232055d4d8a97267517c5e50074c2c819941and<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The maximum time (in seconds) for a document to be placed in the
6ae232055d4d8a97267517c5e50074c2c819941andcache</td></tr>
6ae232055d4d8a97267517c5e50074c2c819941and<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CacheSocacheMaxTime <var>seconds</var></code></td></tr>
6ae232055d4d8a97267517c5e50074c2c819941and<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>CacheSocacheMaxTime 86400</code></td></tr>
6ae232055d4d8a97267517c5e50074c2c819941and<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
6ae232055d4d8a97267517c5e50074c2c819941and<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
6ae232055d4d8a97267517c5e50074c2c819941and<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_cache_socache</td></tr>
6ae232055d4d8a97267517c5e50074c2c819941and<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.5 and later</td></tr>
6ae232055d4d8a97267517c5e50074c2c819941and</table>
6ae232055d4d8a97267517c5e50074c2c819941and <p>The <code class="directive">CacheSocacheMaxTime</code> directive sets the
6ae232055d4d8a97267517c5e50074c2c819941and maximum freshness lifetime, in seconds, for a document to be stored in
6ae232055d4d8a97267517c5e50074c2c819941and the cache. This value overrides the freshness lifetime defined for the
6ae232055d4d8a97267517c5e50074c2c819941and document by the HTTP protocol.</p>
6ae232055d4d8a97267517c5e50074c2c819941and
6ae232055d4d8a97267517c5e50074c2c819941and <pre class="prettyprint lang-config">
6ae232055d4d8a97267517c5e50074c2c819941and CacheSocacheMaxTime 86400
6ae232055d4d8a97267517c5e50074c2c819941and </pre>
6ae232055d4d8a97267517c5e50074c2c819941and
6ae232055d4d8a97267517c5e50074c2c819941and
6ae232055d4d8a97267517c5e50074c2c819941and</div>
6ae232055d4d8a97267517c5e50074c2c819941and<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
6ae232055d4d8a97267517c5e50074c2c819941and<div class="directive-section"><h2><a name="CacheSocacheMinTime" id="CacheSocacheMinTime">CacheSocacheMinTime</a> <a name="cachesocachemintime" id="cachesocachemintime">Directive</a></h2>
6ae232055d4d8a97267517c5e50074c2c819941and<table class="directive">
6ae232055d4d8a97267517c5e50074c2c819941and<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The maximum time (in seconds) for a document to be placed in the
6ae232055d4d8a97267517c5e50074c2c819941andcache</td></tr>
6ae232055d4d8a97267517c5e50074c2c819941and<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CacheSocacheMinTime <var>seconds</var></code></td></tr>
6ae232055d4d8a97267517c5e50074c2c819941and<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>CacheSocacheMinTime 600</code></td></tr>
6ae232055d4d8a97267517c5e50074c2c819941and<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
6ae232055d4d8a97267517c5e50074c2c819941and<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
6ae232055d4d8a97267517c5e50074c2c819941and<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_cache_socache</td></tr>
6ae232055d4d8a97267517c5e50074c2c819941and<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.5 and later</td></tr>
6ae232055d4d8a97267517c5e50074c2c819941and</table>
6ae232055d4d8a97267517c5e50074c2c819941and <p>The <code class="directive">CacheSocacheMinTime</code> directive sets the
6ae232055d4d8a97267517c5e50074c2c819941and amount of seconds beyond the freshness lifetime of the response that the
6ae232055d4d8a97267517c5e50074c2c819941and response should be cached for in the shared object cache. If a response is
6ae232055d4d8a97267517c5e50074c2c819941and only stored for its freshness lifetime, there will be no opportunity to
6ae232055d4d8a97267517c5e50074c2c819941and revalidate the response to make it fresh again.</p>
6ae232055d4d8a97267517c5e50074c2c819941and
6ae232055d4d8a97267517c5e50074c2c819941and <pre class="prettyprint lang-config">
6ae232055d4d8a97267517c5e50074c2c819941and CacheSocacheMinTime 600
6ae232055d4d8a97267517c5e50074c2c819941and </pre>
6ae232055d4d8a97267517c5e50074c2c819941and
6ae232055d4d8a97267517c5e50074c2c819941and
6ae232055d4d8a97267517c5e50074c2c819941and</div>
6ae232055d4d8a97267517c5e50074c2c819941and<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
6ae232055d4d8a97267517c5e50074c2c819941and<div class="directive-section"><h2><a name="CacheSocacheReadSize" id="CacheSocacheReadSize">CacheSocacheReadSize</a> <a name="cachesocachereadsize" id="cachesocachereadsize">Directive</a></h2>
6ae232055d4d8a97267517c5e50074c2c819941and<table class="directive">
6ae232055d4d8a97267517c5e50074c2c819941and<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The minimum size (in bytes) of the document to read and be cached
6ae232055d4d8a97267517c5e50074c2c819941and before sending the data downstream</td></tr>
6ae232055d4d8a97267517c5e50074c2c819941and<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CacheSocacheReadSize <var>bytes</var></code></td></tr>
6ae232055d4d8a97267517c5e50074c2c819941and<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>CacheSocacheReadSize 0</code></td></tr>
6ae232055d4d8a97267517c5e50074c2c819941and<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
6ae232055d4d8a97267517c5e50074c2c819941and<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
6ae232055d4d8a97267517c5e50074c2c819941and<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_cache_socache</td></tr>
6ae232055d4d8a97267517c5e50074c2c819941and<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.5 and later</td></tr>
6ae232055d4d8a97267517c5e50074c2c819941and</table>
6ae232055d4d8a97267517c5e50074c2c819941and <p>The <code class="directive">CacheSocacheReadSize</code> directive sets the
6ae232055d4d8a97267517c5e50074c2c819941and minimum amount of data, in bytes, to be read from the backend before the
6ae232055d4d8a97267517c5e50074c2c819941and data is sent to the client. The default of zero causes all data read of
6ae232055d4d8a97267517c5e50074c2c819941and any size to be passed downstream to the client immediately as it arrives.
6ae232055d4d8a97267517c5e50074c2c819941and Setting this to a higher value causes the disk cache to buffer at least
6ae232055d4d8a97267517c5e50074c2c819941and this amount before sending the result to the client. This can improve
6ae232055d4d8a97267517c5e50074c2c819941and performance when caching content from a slow reverse proxy.</p>
6ae232055d4d8a97267517c5e50074c2c819941and
6ae232055d4d8a97267517c5e50074c2c819941and <p>This directive only takes effect when the data is being saved to the
6ae232055d4d8a97267517c5e50074c2c819941and cache, as opposed to data being served from the cache.</p>
6ae232055d4d8a97267517c5e50074c2c819941and
6ae232055d4d8a97267517c5e50074c2c819941and <pre class="prettyprint lang-config">
6ae232055d4d8a97267517c5e50074c2c819941and CacheReadSize 102400
6ae232055d4d8a97267517c5e50074c2c819941and </pre>
6ae232055d4d8a97267517c5e50074c2c819941and
6ae232055d4d8a97267517c5e50074c2c819941and
6ae232055d4d8a97267517c5e50074c2c819941and</div>
6ae232055d4d8a97267517c5e50074c2c819941and<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
6ae232055d4d8a97267517c5e50074c2c819941and<div class="directive-section"><h2><a name="CacheSocacheReadTime" id="CacheSocacheReadTime">CacheSocacheReadTime</a> <a name="cachesocachereadtime" id="cachesocachereadtime">Directive</a></h2>
6ae232055d4d8a97267517c5e50074c2c819941and<table class="directive">
6ae232055d4d8a97267517c5e50074c2c819941and<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>The minimum time (in milliseconds) that should elapse while reading
6ae232055d4d8a97267517c5e50074c2c819941and before data is sent downstream</td></tr>
6ae232055d4d8a97267517c5e50074c2c819941and<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CacheSocacheReadTime <var>milliseconds</var></code></td></tr>
6ae232055d4d8a97267517c5e50074c2c819941and<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>CacheSocacheReadTime 0</code></td></tr>
6ae232055d4d8a97267517c5e50074c2c819941and<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
6ae232055d4d8a97267517c5e50074c2c819941and<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
6ae232055d4d8a97267517c5e50074c2c819941and<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_cache_socache</td></tr>
6ae232055d4d8a97267517c5e50074c2c819941and<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.5 and later</td></tr>
6ae232055d4d8a97267517c5e50074c2c819941and</table>
6ae232055d4d8a97267517c5e50074c2c819941and <p>The <code class="directive">CacheSocacheReadTime</code> directive sets the minimum amount
6ae232055d4d8a97267517c5e50074c2c819941and of elapsed time that should pass before making an attempt to send data
6ae232055d4d8a97267517c5e50074c2c819941and downstream to the client. During the time period, data will be buffered
6ae232055d4d8a97267517c5e50074c2c819941and before sending the result to the client. This can improve performance when
6ae232055d4d8a97267517c5e50074c2c819941and caching content from a reverse proxy.</p>
6ae232055d4d8a97267517c5e50074c2c819941and
6ae232055d4d8a97267517c5e50074c2c819941and <p>The default of zero disables this option.</p>
6ae232055d4d8a97267517c5e50074c2c819941and
6ae232055d4d8a97267517c5e50074c2c819941and <p>This directive only takes effect when the data is being saved to the
6ae232055d4d8a97267517c5e50074c2c819941and cache, as opposed to data being served from the cache. It is recommended
6ae232055d4d8a97267517c5e50074c2c819941and that this option be used alongside the
6ae232055d4d8a97267517c5e50074c2c819941and <code class="directive"><a href="#cachesocachereadsize">CacheSocacheReadSize</a></code> directive
6ae232055d4d8a97267517c5e50074c2c819941and to ensure that the server does not buffer excessively should data arrive faster
6ae232055d4d8a97267517c5e50074c2c819941and than expected.</p>
6ae232055d4d8a97267517c5e50074c2c819941and
6ae232055d4d8a97267517c5e50074c2c819941and <pre class="prettyprint lang-config">
6ae232055d4d8a97267517c5e50074c2c819941and CacheSocacheReadTime 1000
6ae232055d4d8a97267517c5e50074c2c819941and </pre>
6ae232055d4d8a97267517c5e50074c2c819941and
6ae232055d4d8a97267517c5e50074c2c819941and
6ae232055d4d8a97267517c5e50074c2c819941and</div>
6ae232055d4d8a97267517c5e50074c2c819941and</div>
6ae232055d4d8a97267517c5e50074c2c819941and<div class="bottomlang">
6ae232055d4d8a97267517c5e50074c2c819941and<p><span>Available Languages: </span><a href="/en/mod/mod_cache_socache.html" title="English">&nbsp;en&nbsp;</a> |
6ae232055d4d8a97267517c5e50074c2c819941and<a href="/fr/mod/mod_cache_socache.html" hreflang="fr" rel="alternate" title="Fran�ais">&nbsp;fr&nbsp;</a></p>
6ae232055d4d8a97267517c5e50074c2c819941and</div><div class="top"><a href="#page-header"><img src="/images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
6ae232055d4d8a97267517c5e50074c2c819941and<script type="text/javascript"><!--//--><![CDATA[//><!--
6ae232055d4d8a97267517c5e50074c2c819941andvar comments_shortname = 'httpd';
6ae232055d4d8a97267517c5e50074c2c819941andvar comments_identifier = 'http://httpd.apache.org/docs/trunk/mod/mod_cache_socache.html';
6ae232055d4d8a97267517c5e50074c2c819941and(function(w, d) {
6ae232055d4d8a97267517c5e50074c2c819941and if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
6ae232055d4d8a97267517c5e50074c2c819941and d.write('<div id="comments_thread"><\/div>');
6ae232055d4d8a97267517c5e50074c2c819941and var s = d.createElement('script');
6ae232055d4d8a97267517c5e50074c2c819941and s.type = 'text/javascript';
6ae232055d4d8a97267517c5e50074c2c819941and s.async = true;
6ae232055d4d8a97267517c5e50074c2c819941and s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
6ae232055d4d8a97267517c5e50074c2c819941and (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
6ae232055d4d8a97267517c5e50074c2c819941and }
6ae232055d4d8a97267517c5e50074c2c819941and else {
6ae232055d4d8a97267517c5e50074c2c819941and d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
6ae232055d4d8a97267517c5e50074c2c819941and }
6ae232055d4d8a97267517c5e50074c2c819941and})(window, document);
6ae232055d4d8a97267517c5e50074c2c819941and//--><!]]></script></div><div id="footer">
6ae232055d4d8a97267517c5e50074c2c819941and<p class="apache">Copyright 2013 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
6ae232055d4d8a97267517c5e50074c2c819941and<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/quickreference.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
6ae232055d4d8a97267517c5e50074c2c819941andif (typeof(prettyPrint) !== 'undefined') {
6ae232055d4d8a97267517c5e50074c2c819941and prettyPrint();
6ae232055d4d8a97267517c5e50074c2c819941and}
6ae232055d4d8a97267517c5e50074c2c819941and//--><!]]></script>
6ae232055d4d8a97267517c5e50074c2c819941and</body></html>