From 60a8931fa6096cf41df8ca5a53569741f675ba90 Mon Sep 17 00:00:00 2001 From: Colm MacCarthaigh Date: Wed, 24 Aug 2005 08:18:45 +0000 Subject: [PATCH] Remove over-zealous and invalid use of in the Caching User-guide. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@239563 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/caching.html.en | 39 ------------------------------------- docs/manual/caching.xml | 39 ------------------------------------- 2 files changed, 78 deletions(-) diff --git a/docs/manual/caching.html.en b/docs/manual/caching.html.en index 0f7dfb8326..414d48a027 100644 --- a/docs/manual/caching.html.en +++ b/docs/manual/caching.html.en @@ -112,8 +112,6 @@

Improving Cache Hits

- -

When caching locally generated content, ensuring that UseCanonicalName is set to On can dramatically improve the ratio of cache hits. This @@ -139,13 +137,11 @@

If you are using Server Side Includes, and want the benefit of speedy serves from the cache, you should use virtual include types.

-

Expiry Periods

-

The default expiry period for cached entities is one hour, however this can be easily over-ridden by using the CacheDefaultExpire directive. This default is only used when the original source of the content does not @@ -160,14 +156,12 @@

The maximum expiry period may also be controlled by using the CacheMaxExpire.

-

A Brief Guide to Conditional Requests

-

When content expires from the cache and is re-requested from the backend or content provider, rather than pass on the original request, Aoache will use a conditional request instead.

@@ -203,13 +197,11 @@ from the cache if it has not changed. As long as reading from the cache store is faster than reading from the backend (e.g. an in-memory cache compared to reading from disk).

-

What Can be Cached?

-

As mentioned already, the two styles of caching in Apache work differently, mod_file_cache caching maintains file contents as they were when Apache was started. When a request is @@ -260,15 +252,11 @@

  • A response will not be stored if it includes a "Vary:" header containing the match-all "*".
  • - -

    What Should Not be Cached?

    - -

    In short, any content which is highly time-sensitive, or which varies depending on the particulars of the request that are not covered by HTTP negotiation, should not be cached.

    @@ -280,13 +268,11 @@

    If on the other hand, the content served differs depending on the values of various HTTP headers, it is possible that it might be possible to cache it intelligently through the use of a "Vary" header.

    -

    Variable/Negotiated Content

    -

    If a response with a "Vary" header is received by mod_cache when requesting content by the backend it will attempt to handle it intelligently. If possible, @@ -303,7 +289,6 @@ Vary: negotiate,accept-language,accept-charset

    mod_cache will only serve the cached content to requesters with matching accept-language and accept-charset headers matching those of the original request.

    -
    top
    @@ -314,7 +299,6 @@ Vary: negotiate,accept-language,accept-charset

    Local exploits

    -

    As requests to end-users can be served from the cache, the cache itself can become a target for those wishing to deface or interfere with content. It is important to bear in mind that the cache must at all @@ -332,15 +316,12 @@ Vary: negotiate,accept-language,accept-charset using mod_disk_cache you should bear this in mind - ensure you upgrade Apache when security upgrades are announced and run CGI processes as a non-Apache user using suEXEC if possible.

    -

    Cache Poisoning

    - -

    When running Apache as a caching proxy server, there is also the potential for so-called cache poisoning. Cache Poisoning is a broad term for attacks in which an attacker causes the proxy server to @@ -358,7 +339,6 @@ Vary: negotiate,accept-language,accept-charset a series of requests, and to exploit a vulnerability on an origin webserver such that the attacker can entirely control the content retrieved by the proxy.

    -
    top
    @@ -375,7 +355,6 @@ Vary: negotiate,accept-language,accept-charset

    CacheFile

    -

    The most basic form of caching present in Apache is the file-handle caching provided by mod_file_cache. Rather than caching file-contents, this cache maintains a table of open file descriptors. Files @@ -406,13 +385,11 @@ Vary: negotiate,accept-language,accept-charset will have been deleted, and not show up on the filesystem, extra free space will not be recovered until Apache is stopped and the file descriptor closed.

    -

    CacheEnable fd

    -

    mod_mem_cache also provides its own file-handle caching scheme, which can be enabled via the CacheEnable directive.

    @@ -422,8 +399,6 @@ Vary: negotiate,accept-language,accept-charset

    As with all of mod_cache this type of file-handle caching is intelligent, and handles will not be maintained beyond the expiry time of the cached content.

    - -
    top
    @@ -452,7 +427,6 @@ Vary: negotiate,accept-language,accept-charset

    Operating System Caching

    -

    Almost all modern operating systems cache file-data in memory managed directly by the kernel. This is a powerful feature, and for the most part operating systems get it right. For example, on Linux, let's look at @@ -482,7 +456,6 @@ sys 0m0.000s

    deleted or modified, it can automatically remove file contents from the cache when neccessary. This is a big advantage over Apache's in-memory caching which has no way of knowing when a file has changed.

    -

    Despite the performance and advantages of automatic operating system @@ -497,7 +470,6 @@ sys 0m0.000s

    MMapStatic Caching

    -

    mod_file_cache provides the MMapStatic directive, which allows you to have Apache map a static file's contents into memory at @@ -517,14 +489,11 @@ sys 0m0.000s process will replicate this memory, so it is critically important to ensure that the files mapped are not so large as to cause the system to swap memory.

    -
    -

    mod_mem_cache Caching

    -

    mod_mem_cache provides a HTTP-aware intelligent in-memory cache. It also uses heap memory directly, which means that even if MMap is not supported on your system, @@ -538,9 +507,6 @@ CacheEnable mem / # Limit the size of the cache to 1 Megabyte MCacheSize 1024 - - -

    top
    @@ -571,7 +537,6 @@ CacheDirLength 1

    Understanding the Cache-Store

    -

    To store items in the cache, mod_disk_cache creates a 22 character hash of the url being requested. Thie hash incorporates the hostname, protocol, port, path and any CGI arguments to the URL, @@ -622,13 +587,11 @@ CacheDirLength 1 ".vary" directory will be created for the url in question. This directory will have multiple ".data" files corresponding to the differently negotiated content.

    -

    Maintaining the Disk Cache

    -

    Although mod_disk_cache will remove cached content as it is expired, it does not maintain any information on the total size of the cache or how little free space may be left.

    @@ -655,8 +618,6 @@ CacheDirLength 1 to how much space is used you should ensure that htcacheclean is configured to leave enough "grow room" following a clean.

    - -
    diff --git a/docs/manual/caching.xml b/docs/manual/caching.xml index 9115cdcd50..8d53c9dd13 100644 --- a/docs/manual/caching.xml +++ b/docs/manual/caching.xml @@ -127,8 +127,6 @@
    Improving Cache Hits - -

    When caching locally generated content, ensuring that UseCanonicalName is set to On can dramatically improve the ratio of cache hits. This @@ -156,13 +154,11 @@

    If you are using Server Side Includes, and want the benefit of speedy serves from the cache, you should use virtual include types.

    -
    Expiry Periods -

    The default expiry period for cached entities is one hour, however this can be easily over-ridden by using the CacheDefaultExpire directive. This @@ -179,14 +175,12 @@

    The maximum expiry period may also be controlled by using the CacheMaxExpire.

    -
    A Brief Guide to Conditional Requests -

    When content expires from the cache and is re-requested from the backend or content provider, rather than pass on the original request, Aoache will use a conditional request instead.

    @@ -222,13 +216,11 @@ from the cache if it has not changed. As long as reading from the cache store is faster than reading from the backend (e.g. an in-memory cache compared to reading from disk).

    -
    What Can be Cached? -

    As mentioned already, the two styles of caching in Apache work differently, mod_file_cache caching maintains file contents as they were when Apache was started. When a request is @@ -281,15 +273,11 @@

  • A response will not be stored if it includes a "Vary:" header containing the match-all "*".
  • - -
    What Should Not be Cached? - -

    In short, any content which is highly time-sensitive, or which varies depending on the particulars of the request that are not covered by HTTP negotiation, should not be cached.

    @@ -301,13 +289,11 @@

    If on the other hand, the content served differs depending on the values of various HTTP headers, it is possible that it might be possible to cache it intelligently through the use of a "Vary" header.

    -
    Variable/Negotiated Content -

    If a response with a "Vary" header is received by mod_cache when requesting content by the backend it will attempt to handle it intelligently. If possible, @@ -324,7 +310,6 @@ Vary: negotiate,accept-language,accept-charset

    mod_cache will only serve the cached content to requesters with matching accept-language and accept-charset headers matching those of the original request.

    -
    @@ -335,7 +320,6 @@ Vary: negotiate,accept-language,accept-charset
    Local exploits -

    As requests to end-users can be served from the cache, the cache itself can become a target for those wishing to deface or interfere with content. It is important to bear in mind that the cache must at all @@ -354,15 +338,12 @@ Vary: negotiate,accept-language,accept-charset ensure you upgrade Apache when security upgrades are announced and run CGI processes as a non-Apache user using suEXEC if possible.

    -
    Cache Poisoning - -

    When running Apache as a caching proxy server, there is also the potential for so-called cache poisoning. Cache Poisoning is a broad term for attacks in which an attacker causes the proxy server to @@ -380,7 +361,6 @@ Vary: negotiate,accept-language,accept-charset a series of requests, and to exploit a vulnerability on an origin webserver such that the attacker can entirely control the content retrieved by the proxy.

    -
    @@ -407,7 +387,6 @@ Vary: negotiate,accept-language,accept-charset
    CacheFile -

    The most basic form of caching present in Apache is the file-handle caching provided by mod_file_cache. Rather than caching file-contents, this cache maintains a table of open file descriptors. Files @@ -440,13 +419,11 @@ Vary: negotiate,accept-language,accept-charset will have been deleted, and not show up on the filesystem, extra free space will not be recovered until Apache is stopped and the file descriptor closed.

    -
    CacheEnable fd -

    mod_mem_cache also provides its own file-handle caching scheme, which can be enabled via the CacheEnable directive.

    @@ -458,8 +435,6 @@ Vary: negotiate,accept-language,accept-charset

    As with all of mod_cache this type of file-handle caching is intelligent, and handles will not be maintained beyond the expiry time of the cached content.

    - -
    @@ -498,7 +473,6 @@ Vary: negotiate,accept-language,accept-charset
    Operating System Caching -

    Almost all modern operating systems cache file-data in memory managed directly by the kernel. This is a powerful feature, and for the most part operating systems get it right. For example, on Linux, let's look at @@ -529,7 +503,6 @@ sys 0m0.000s deleted or modified, it can automatically remove file contents from the cache when neccessary. This is a big advantage over Apache's in-memory caching which has no way of knowing when a file has changed.

    -

    Despite the performance and advantages of automatic operating system @@ -544,7 +517,6 @@ sys 0m0.000s

    MMapStatic Caching -

    mod_file_cache provides the MMapStatic directive, which allows you to have Apache map a static file's contents into memory at @@ -566,14 +538,11 @@ sys 0m0.000s process will replicate this memory, so it is critically important to ensure that the files mapped are not so large as to cause the system to swap memory.

    -
    -
    mod_mem_cache Caching -

    mod_mem_cache provides a HTTP-aware intelligent in-memory cache. It also uses heap memory directly, which means that even if MMap is not supported on your system, @@ -588,9 +557,6 @@ CacheEnable mem / # Limit the size of the cache to 1 Megabyte MCacheSize 1024 - - -

    @@ -631,7 +597,6 @@ CacheDirLength 1
    Understanding the Cache-Store -

    To store items in the cache, mod_disk_cache creates a 22 character hash of the url being requested. Thie hash incorporates the hostname, protocol, port, path and any CGI arguments to the URL, @@ -682,13 +647,11 @@ CacheDirLength 1 ".vary" directory will be created for the url in question. This directory will have multiple ".data" files corresponding to the differently negotiated content.

    -
    Maintaining the Disk Cache -

    Although mod_disk_cache will remove cached content as it is expired, it does not maintain any information on the total size of the cache or how little free space may be left.

    @@ -719,8 +682,6 @@ CacheDirLength 1 to how much space is used you should ensure that htcacheclean is configured to leave enough "grow room" following a clean.

    - -
    -- 2.40.0