From d9f39319c8a587d37e3b9c93e787c06cd6177db1 Mon Sep 17 00:00:00 2001 From: Rich Bowen Date: Wed, 19 May 2010 01:07:27 +0000 Subject: [PATCH] More information for the dbm map type. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@945987 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/rewrite/rewritemap.html.en | 52 +++++++++++++++++++------ docs/manual/rewrite/rewritemap.xml | 53 ++++++++++++++++++++------ 2 files changed, 81 insertions(+), 24 deletions(-) diff --git a/docs/manual/rewrite/rewritemap.html.en b/docs/manual/rewrite/rewritemap.html.en index 0c85cc4214..608100db6e 100644 --- a/docs/manual/rewrite/rewritemap.html.en +++ b/docs/manual/rewrite/rewritemap.html.en @@ -222,20 +222,48 @@ static www1|www1|www2|www3|www4

dbm: DBM Hash File

-

MapType: - dbm[=type], MapSource: Unix filesystem - path to valid regular file

-

Here the source is a binary format DBM file containing - the same contents as a Plain Text format file, but - in a special representation which is optimized for really - fast lookups. The type can be sdbm, gdbm, ndbm, or - db depending on compile-time - settings. If the type is omitted, the - compile-time default will be chosen.

-

To create a dbm file from a source text file, use the httxt2dbm utility.

-

+ +

When a MapType of dbm is used, the MapSource is a + filesystem path to a DBM database file containing key/value pairs to + be used in the mapping. This works exactly the same way as the + txt map, but is much faster, because a DBM is indexed, + whereas a text file is not. This allows more rapid access to the + desired key.

+ +

You may optionally specify a particular dbm type:

+ +

+ RewriteMap examplemap dbm=sdbm:/etc/apache/mapfile.dbm +

+ +

The type can be sdbm, gdbm, ndbm or db. + However, it is recommended that you just use the httxt2dbm utility that is + provided with Apache HTTP Server, as it will use the correct DBM library, + matching the one that was used when httpd itself was built.

+ +

To create a dbm file, first create a text map file as described + in the txt section. Then run + httxt2dbm:

+ +

$ httxt2dbm -i mapfile.txt -o mapfile.map

+ +

You can then reference the resulting file in your +RewriteMap directive:

+ +

+RewriteMap mapname dbm:/etc/apache/mapfile.map +

+ +
+

Note that with some dbm types, more than one file is generated, with +a common base name. For example, you may have two files named +mapfile.map.dir and mapfiile.map.pag. This is +normal, and you need only use the base name mapfile.map in +your RewriteMap directive.

+
+
top

int: Internal Function

diff --git a/docs/manual/rewrite/rewritemap.xml b/docs/manual/rewrite/rewritemap.xml index 74f8dc9545..d2fe1d3c7e 100644 --- a/docs/manual/rewrite/rewritemap.xml +++ b/docs/manual/rewrite/rewritemap.xml @@ -224,20 +224,49 @@ static www1|www1|www2|www3|www4
dbm: DBM Hash File -

MapType: - dbm[=type], MapSource: Unix filesystem - path to valid regular file

-

Here the source is a binary format DBM file containing - the same contents as a Plain Text format file, but - in a special representation which is optimized for really - fast lookups. The type can be sdbm, gdbm, ndbm, or - db depending on compile-time - settings. If the type is omitted, the - compile-time default will be chosen.

-

To create a dbm file from a source text file, use the httxt2dbm utility.

- + +

When a MapType of dbm is used, the MapSource is a + filesystem path to a DBM database file containing key/value pairs to + be used in the mapping. This works exactly the same way as the + txt map, but is much faster, because a DBM is indexed, + whereas a text file is not. This allows more rapid access to the + desired key.

+ +

You may optionally specify a particular dbm type:

+ + + RewriteMap examplemap dbm=sdbm:/etc/apache/mapfile.dbm + + +

The type can be sdbm, gdbm, ndbm or db. + However, it is recommended that you just use the httxt2dbm utility that is + provided with Apache HTTP Server, as it will use the correct DBM library, + matching the one that was used when httpd itself was built.

+ +

To create a dbm file, first create a text map file as described + in the txt section. Then run + httxt2dbm:

+ + $ httxt2dbm -i mapfile.txt -o mapfile.map + +

You can then reference the resulting file in your +RewriteMap directive:

+ + +RewriteMap mapname dbm:/etc/apache/mapfile.map + + + +

Note that with some dbm types, more than one file is generated, with +a common base name. For example, you may have two files named +mapfile.map.dir and mapfiile.map.pag. This is +normal, and you need only use the base name mapfile.map in +your RewriteMap directive.

+
+
int: Internal Function -- 2.40.0