Apache cache configuration _ PHP Tutorial

Source: Internet
Author: User
Apache cache configuration. Configuration Example: CacheDefaultExpire: sets the cache Expiration Time (in seconds). The default value is 1 hour. This command is only used when the cached document does not set the expiration time or the last modification time.

Configuration example:

   

CacheDefaultExpire: Set the cache Expiration Time (in seconds). The default value is 1 hour. this command takes effect only when the cache document does not set the expiration time or the last modification time.
CacheEnable: Enable cache. The first parameter is the cache type, and the second parameter is the cache path. it refers to the url path. here, it is the cache of all things. simply enter, for example, "/docs" only caches all files under/docs.
CacheRoot: The Directory where the cached file is located. the user running Apache (such as daemon or nobody) must be able to read and write the file. if it is unclear, it can be set to 777 directly, manually create the directory and set the access permission
CacheDirLevels: Depth of the cache Directory. the default value is 3. set this parameter to 5.
CacheDirLength: The length of the cached directory name. The default value is 4. set this parameter to 5.
CacheMaxFileSizeAndCacheMinFileSize: Maximum and minimum values of cached files (byte). If the value exceeds this range, the files will not be cached. here, the values are set to 1 MB and 10 bytes.

  

CacheEnable: Enables caching and uses memory-based storage.
MCacheMaxObjectCount: The maximum number of cache objects in memory. the default value is 1009. set this parameter to 20000.
MCacheMaxObjectSize: The maximum size of a single cache object is 1 MB. the default value is 10000 bytes.
MCacheMaxStreamingBuffer: Maximum size of the objects to be cached in the buffer zone. set this parameter to 65536, which is usually less than 100000 or the value set by MCacheMaxObjectSize.
MCacheMinObjectSize: The minimum size of a cache object is 10 bytes. the default value is 1 bytes.
MCacheRemovalAlgorithm: The algorithm used to clear the cache. the default value is GDSF. you can check Apache official documentation for the LRU algorithm.

MCacheSize: Maximum memory available for cached data. unit: kb. default value: 128 kb. set this parameter to MB.

# Cached content


                                                                       

CacheDefaultExpire: sets the cache Expiration Time (in seconds). The default value is 1 hour. This command is only available when the cached document does not set the expiration time or the last modification time...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.