mod_disk_cache.xml revision f312a039cc79d35be2dcb8aa20d91b31b9394c9f
d5b78898eacc41a91f1e2d06c0f07bb9d449431aTim Reddehase<!DOCTYPE modulesynopsis SYSTEM "/style/modulesynopsis.dtd">
d5b78898eacc41a91f1e2d06c0f07bb9d449431aTim Reddehase<?xml-stylesheet type="text/xsl" href="/style/manual.en.xsl"?>
d5b78898eacc41a91f1e2d06c0f07bb9d449431aTim Reddehase<!-- $LastChangedRevision$ -->
d5b78898eacc41a91f1e2d06c0f07bb9d449431aTim Reddehase Licensed to the Apache Software Foundation (ASF) under one or more
d5b78898eacc41a91f1e2d06c0f07bb9d449431aTim Reddehase contributor license agreements. See the NOTICE file distributed with
d5b78898eacc41a91f1e2d06c0f07bb9d449431aTim Reddehase this work for additional information regarding copyright ownership.
d5b78898eacc41a91f1e2d06c0f07bb9d449431aTim Reddehase The ASF licenses this file to You under the Apache License, Version 2.0
d5b78898eacc41a91f1e2d06c0f07bb9d449431aTim Reddehase (the "License"); you may not use this file except in compliance with
d5b78898eacc41a91f1e2d06c0f07bb9d449431aTim Reddehase the License. You may obtain a copy of the License at
c6c01b2a35434c3983e95b00dcf1774a1ad046a8Eugen Kuksa Unless required by applicable law or agreed to in writing, software
c6c01b2a35434c3983e95b00dcf1774a1ad046a8Eugen Kuksa distributed under the License is distributed on an "AS IS" BASIS,
c6c01b2a35434c3983e95b00dcf1774a1ad046a8Eugen Kuksa WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
912a060c45c036ed9cfb0238fd21595a676fb9ffEugen Kuksa See the License for the specific language governing permissions and
c6c01b2a35434c3983e95b00dcf1774a1ad046a8Eugen Kuksa limitations under the License.
c6c01b2a35434c3983e95b00dcf1774a1ad046a8Eugen Kuksa<modulesynopsis metafile="mod_disk_cache.xml.meta">
c6c01b2a35434c3983e95b00dcf1774a1ad046a8Eugen Kuksa<description>Disk based storage module for the HTTP caching filter.</description>
c6c01b2a35434c3983e95b00dcf1774a1ad046a8Eugen Kuksa <p><module>mod_disk_cache</module> implements a disk based storage
c6c01b2a35434c3983e95b00dcf1774a1ad046a8Eugen Kuksa <p>The headers and bodies of cached responses are stored separately on
912a060c45c036ed9cfb0238fd21595a676fb9ffEugen Kuksa disk, in a directory structure derived from the md5 hash of the cached
c6c01b2a35434c3983e95b00dcf1774a1ad046a8Eugen Kuksa <p>Multiple content negotiated responses can be stored concurrently,
c6c01b2a35434c3983e95b00dcf1774a1ad046a8Eugen Kuksa however the caching of partial content is not yet supported by this
c6c01b2a35434c3983e95b00dcf1774a1ad046a8Eugen Kuksa <p>Atomic cache updates to both header and body files are achieved
c6c01b2a35434c3983e95b00dcf1774a1ad046a8Eugen Kuksa without the need for locking by storing the device and inode numbers of
c6c01b2a35434c3983e95b00dcf1774a1ad046a8Eugen Kuksa the body file within the header file. This has the side effect that
c6c01b2a35434c3983e95b00dcf1774a1ad046a8Eugen Kuksa cache entries manually moved into the cache will be ignored.</p>
c6c01b2a35434c3983e95b00dcf1774a1ad046a8Eugen Kuksa <p>The <program>htcacheclean</program> tool is provided to list cached
912a060c45c036ed9cfb0238fd21595a676fb9ffEugen Kuksa URLs, remove cached URLs, or to maintain the size of the disk cache
c6c01b2a35434c3983e95b00dcf1774a1ad046a8Eugen Kuksa within size and/or inode limits. The tool can be run on demand, or
c6c01b2a35434c3983e95b00dcf1774a1ad046a8Eugen Kuksa can be daemonized to offer continuous monitoring of directory sizes.</p>
c6c01b2a35434c3983e95b00dcf1774a1ad046a8Eugen Kuksa <p><module>mod_disk_cache</module> requires the services of
c6c01b2a35434c3983e95b00dcf1774a1ad046a8Eugen Kuksa <p><module>mod_disk_cache</module> uses the sendfile feature to
c6c01b2a35434c3983e95b00dcf1774a1ad046a8Eugen Kuksa serve files from the cache when supported by the platform, and
c6c01b2a35434c3983e95b00dcf1774a1ad046a8Eugen Kuksa when enabled with <directive module="core">EnableSendfile</directive>.
912a060c45c036ed9cfb0238fd21595a676fb9ffEugen Kuksa However, per-directory and .htaccess configuration of
912a060c45c036ed9cfb0238fd21595a676fb9ffEugen Kuksa <directive module="core">EnableSendfile</directive> are ignored by
912a060c45c036ed9cfb0238fd21595a676fb9ffEugen Kuksa <module>mod_disk_cache</module> as the corresponding settings are not
c6c01b2a35434c3983e95b00dcf1774a1ad046a8Eugen Kuksa available to the module when a request is being served from the
6a23d1f9b4ea1b8cdf98676e057e9ae7db82e5d4Tim Reddehase<directivesynopsis>
6a23d1f9b4ea1b8cdf98676e057e9ae7db82e5d4Tim Reddehase<description>The directory root under which cache files are
6a23d1f9b4ea1b8cdf98676e057e9ae7db82e5d4Tim Reddehasestored</description>
6a23d1f9b4ea1b8cdf98676e057e9ae7db82e5d4Tim Reddehase<syntax>CacheRoot <var>directory</var></syntax>
6a23d1f9b4ea1b8cdf98676e057e9ae7db82e5d4Tim Reddehase<contextlist><context>server config</context><context>virtual host</context>
6a23d1f9b4ea1b8cdf98676e057e9ae7db82e5d4Tim Reddehase</contextlist>
6a23d1f9b4ea1b8cdf98676e057e9ae7db82e5d4Tim Reddehase <p>The <directive>CacheRoot</directive> directive defines the name of
6a23d1f9b4ea1b8cdf98676e057e9ae7db82e5d4Tim Reddehase the directory on the disk to contain cache files. If the <module
6a23d1f9b4ea1b8cdf98676e057e9ae7db82e5d4Tim Reddehase >mod_disk_cache</module> module has been loaded or compiled in to the
6a23d1f9b4ea1b8cdf98676e057e9ae7db82e5d4Tim Reddehase Apache server, this directive <em>must</em> be defined. Failing to
6a23d1f9b4ea1b8cdf98676e057e9ae7db82e5d4Tim Reddehase provide a value for <directive>CacheRoot</directive> will result in
6a23d1f9b4ea1b8cdf98676e057e9ae7db82e5d4Tim Reddehase a configuration file processing error. The <directive
6a23d1f9b4ea1b8cdf98676e057e9ae7db82e5d4Tim Reddehase module="mod_disk_cache">CacheDirLevels</directive> and <directive
6a23d1f9b4ea1b8cdf98676e057e9ae7db82e5d4Tim Reddehase module="mod_disk_cache">CacheDirLength</directive> directives define
6a23d1f9b4ea1b8cdf98676e057e9ae7db82e5d4Tim Reddehase the structure of the directories under the specified root directory.</p>
6a23d1f9b4ea1b8cdf98676e057e9ae7db82e5d4Tim Reddehase CacheRoot c:/cacheroot
6a23d1f9b4ea1b8cdf98676e057e9ae7db82e5d4Tim Reddehase</directivesynopsis>
6a23d1f9b4ea1b8cdf98676e057e9ae7db82e5d4Tim Reddehase<directivesynopsis>
c6c01b2a35434c3983e95b00dcf1774a1ad046a8Eugen Kuksa<description>The number of levels of subdirectories in the
c6c01b2a35434c3983e95b00dcf1774a1ad046a8Eugen Kuksacache.</description>
d5b78898eacc41a91f1e2d06c0f07bb9d449431aTim Reddehase<syntax>CacheDirLevels <var>levels</var></syntax>