企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
# Apache模块 mod_disk_cache | [说明](#calibre_link-11) | 基于磁盘的缓冲管理器 | | --- | --- | | [状态](#calibre_link-12) | 扩展(E) | | [模块名](#calibre_link-13) | disk_cache_module | | [源文件](#calibre_link-14) | mod_disk_cache.c | ### 概述 `mod_disk_cache` implements a disk based storage manager. It is primarily of use in conjunction `mod_cache`. Content is stored in and retrieved from the cache using URI based keys. Content with access protection is not cached. `htcacheclean` can be used to maintain the cache size at a maximum level. ### 注意: `mod_disk_cache` requires the services of `mod_cache`. ## CacheDirLength 指令 | [说明](#calibre_link-18) | The number of characters in subdirectory names | | --- | --- | | [语法](#calibre_link-19) | `CacheDirLength length` | | [默认值](#calibre_link-24) | `CacheDirLength 2` | | [作用域](#calibre_link-20) | server config, virtual host | | [状态](#calibre_link-21) | 扩展(E) | | [模块](#calibre_link-22) | mod_disk_cache | `CacheDirLength` directive sets the number of characters for each subdirectory name in the cache hierarchy. The result of `CacheDirLevels`* `CacheDirLength` must not be higher than 20. ``` CacheDirLength 4 ``` ## CacheDirLevels 指令 | [说明](#calibre_link-18) | The number of levels of subdirectories in the cache. | | --- | --- | | [语法](#calibre_link-19) | `CacheDirLevels levels` | | [默认值](#calibre_link-24) | `CacheDirLevels 3` | | [作用域](#calibre_link-20) | server config, virtual host | | [状态](#calibre_link-21) | 扩展(E) | | [模块](#calibre_link-22) | mod_disk_cache | `CacheDirLevels` directive sets the number of subdirectory levels in the cache. Cached data will be saved this many directory levels below the `CacheRoot` directory. The result of `CacheDirLevels`* `CacheDirLength` must not be higher than 20. ``` CacheDirLevels 5 ``` ## CacheMaxFileSize 指令 | [说明](#calibre_link-18) | The maximum size (in bytes) of a document to be placed in the cache | | --- | --- | | [语法](#calibre_link-19) | `CacheMaxFileSize bytes` | | [默认值](#calibre_link-24) | `CacheMaxFileSize 1000000` | | [作用域](#calibre_link-20) | server config, virtual host | | [状态](#calibre_link-21) | 扩展(E) | | [模块](#calibre_link-22) | mod_disk_cache | `CacheMaxFileSize` directive sets the maximum size, in bytes, for a document to be considered for storage in the cache. ``` CacheMaxFileSize 64000 ``` ## CacheMinFileSize 指令 | [说明](#calibre_link-18) | The minimum size (in bytes) of a document to be placed in the cache | | --- | --- | | [语法](#calibre_link-19) | `CacheMinFileSize bytes` | | [默认值](#calibre_link-24) | `CacheMinFileSize 1` | | [作用域](#calibre_link-20) | server config, virtual host | | [状态](#calibre_link-21) | 扩展(E) | | [模块](#calibre_link-22) | mod_disk_cache | `CacheMinFileSize` directive sets the minimum size, in bytes, for a document to be considered for storage in the cache. ``` CacheMinFileSize 64 ``` ## CacheRoot 指令 | [说明](#calibre_link-18) | The directory root under which cache files are stored | | --- | --- | | [语法](#calibre_link-19) | `CacheRoot directory` | | [作用域](#calibre_link-20) | server config, virtual host | | [状态](#calibre_link-21) | 扩展(E) | | [模块](#calibre_link-22) | mod_disk_cache | `CacheRoot` directive defines the name of the directory on the disk to contain cache files. If the `mod_disk_cache` 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`和`CacheDirLength` directives define the structure of the directories under the specified root directory. ``` CacheRoot c:/cacheroot ```