Apache. Документация на русском


Разделы:   1    2    3    4    5    6    7    8    9      10      11    12    13    14    15    16  

Раздел 10. Apache modules

Пункты:   85    86    88    89    90    91    92    93    94    95    96    97    98    99    100    101    102    103    104    105    106    107    108    109    110    111    112    113    114    115    116    117    118    119    120    121      122      123    124    125    126    127    128    129    130    131    132    133    134    135    136    137    138    139    140    141    142    143    144    145    146    147    148    149    150    151    152    153    154    155    156    157    158    159    160    161    163    164    165    166    167    168    170    171    172    173    174    175    176    177    178    179    180    181    182    183    184    185    186    187    188    189    190    191    192    193    194    195    196    197    198    199    200    201    203    204    205    206    207    208    209    210    211    212    213  

 <         > 
RU          EN  

Пункт 122. Apache Module mod_cache_disk
Description:Disk based storage module for the HTTP caching filter.
Status:Extension
Module Identifier:cache_disk_module
Source File:mod_cache_disk.c

Summary

mod_cache_disk implements a disk based storage manager for mod_cache .

The headers and bodies of cached responses are stored separately on disk, in a directory structure derived from the md5 hash of the cached URL.

Multiple content negotiated responses can be stored concurrently, however the caching of partial content is not yet supported by this module.

Atomic cache updates to both header and body files are achieved without the need for locking by storing the device and inode numbers of the body file within the header file. This has the side effect that cache entries manually moved into the cache will be ignored.

The htcacheclean tool is provided to list cached URLs, remove cached URLs, or to maintain the size of the disk cache within size and/or inode limits. The tool can be run on demand, or can be daemonized to offer continuous monitoring of directory sizes.

Note:

mod_cache_disk requires the services of mod_cache , which must be loaded before mod_cache_disk.

Note:

mod_cache_disk uses the sendfile feature to serve files from the cache when supported by the platform, and when enabled with EnableSendfile . However, per-directory and .htaccess configuration of EnableSendfile are ignored by mod_cache_disk as the corresponding settings are not available to the module when a request is being served from the cache.

CacheDirLength Directive

Description:The number of characters in subdirectory names
Syntax: CacheDirLength length
Default: CacheDirLength 2
Context:server config, virtual host
Status:Extension
Module:mod_cache_disk

The CacheDirLength directive sets the number of characters for each subdirectory name in the cache hierarchy. It can be used in conjunction with CacheDirLevels to determine the approximate structure of your cache hierarchy.

A high value for CacheDirLength combined with a low value for CacheDirLevels will result in a relatively flat hierarchy, with a large number of subdirectories at each level.

The result of CacheDirLevels * CacheDirLength must not be higher than 20.

CacheDirLevels Directive

Description:The number of levels of subdirectories in the cache.
Syntax: CacheDirLevels levels
Default: CacheDirLevels 2
Context:server config, virtual host
Status:Extension
Module:mod_cache_disk

The CacheDirLevels directive sets the number of subdirectory levels in the cache. Cached data will be saved this many directory levels below the CacheRoot directory.

A high value for CacheDirLevels combined with a low value for CacheDirLength will result in a relatively deep hierarchy, with a small number of subdirectories at each level.

The result of CacheDirLevels * CacheDirLength must not be higher than 20.

CacheMaxFileSize Directive

Description:The maximum size (in bytes) of a document to be placed in the cache
Syntax: CacheMaxFileSize bytes
Default: CacheMaxFileSize 1000000
Context:server config, virtual host, directory, .htaccess
Status:Extension
Module:mod_cache_disk

The CacheMaxFileSize directive sets the maximum size, in bytes, for a document to be considered for storage in the cache.

CacheMaxFileSize 64000

CacheMinFileSize Directive

Description:The minimum size (in bytes) of a document to be placed in the cache
Syntax: CacheMinFileSize bytes
Default: CacheMinFileSize 1
Context:server config, virtual host, directory, .htaccess
Status:Extension
Module:mod_cache_disk

The CacheMinFileSize directive sets the minimum size, in bytes, for a document to be considered for storage in the cache.

CacheMinFileSize 64

CacheReadSize Directive

Description:The minimum size (in bytes) of the document to read and be cached before sending the data downstream
Syntax: CacheReadSize bytes
Default: CacheReadSize 0
Context:server config, virtual host, directory, .htaccess
Status:Extension
Module:mod_cache_disk

The CacheReadSize directive sets the minimum amount of data, in bytes, to be read from the backend before the data is sent to the client. The default of zero causes all data read of any size to be passed downstream to the client immediately as it arrives. Setting this to a higher value causes the disk cache to buffer at least this amount before sending the result to the client. This can improve performance when caching content from a reverse proxy.

This directive only takes effect when the data is being saved to the cache, as opposed to data being served from the cache.

CacheReadSize 102400

CacheReadTime Directive

Description:The minimum time (in milliseconds) that should elapse while reading before data is sent downstream
Syntax: CacheReadTime milliseconds
Default: CacheReadTime 0
Context:server config, virtual host, directory, .htaccess
Status:Extension
Module:mod_cache_disk

The CacheReadTime directive sets the minimum amount of elapsed time that should pass before making an attempt to send data downstream to the client. During the time period, data will be buffered before sending the result to the client. This can improve performance when caching content from a reverse proxy.

The default of zero disables this option.

This directive only takes effect when the data is being saved to the cache, as opposed to data being served from the cache. It is recommended that this option be used alongside the CacheReadSize directive to ensure that the server does not buffer excessively should data arrive faster than expected.

CacheReadTime 1000

CacheRoot Directive

Description:The directory root under which cache files are stored
Syntax: CacheRoot directory
Context:server config, virtual host
Status:Extension
Module:mod_cache_disk

The CacheRoot directive defines the name of the directory on the disk to contain cache files. If the mod_cache_disk module has been loaded or compiled in to the Apache server, this directive must be defined. Failing to provide a value for CacheRoot will result in a configuration file processing error. The CacheDirLevels and CacheDirLength directives define the structure of the directories under the specified root directory.

CacheRoot c:/cacheroot


 <         > 

Пункты:   85    86    88    89    90    91    92    93    94    95    96    97    98    99    100    101    102    103    104    105    106    107    108    109    110    111    112    113    114    115    116    117    118    119    120    121      122      123    124    125    126    127    128    129    130    131    132    133    134    135    136    137    138    139    140    141    142    143    144    145    146    147    148    149    150    151    152    153    154    155    156    157    158    159    160    161    163    164    165    166    167    168    170    171    172    173    174    175    176    177    178    179    180    181    182    183    184    185    186    187    188    189    190    191    192    193    194    195    196    197    198    199    200    201    203    204    205    206    207    208    209    210    211    212    213  

Рейтинг@Mail.ru