aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rw-r--r--README4
-rw-r--r--src/vmod-variable.32
3 files changed, 4 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index 9270c09..1c3e867 100644
--- a/NEWS
+++ b/NEWS
@@ -1,20 +1,20 @@
vmod-variable -- history of user-visible changes. 2015-02-16
Copyright (C) 2015 Sergey Poznyakoff
See the end of file for copying conditions.
Please send vmod-variable bug reports to <gray@gnu.org>
-Version 1.0, (git)
+Version 1.0, 2015-02-16
Initial release
=========================================================================
Copyright information:
Copyright (C) 2015 Sergey Poznyakoff
Permission is granted to anyone to make or distribute verbatim copies
of this document as received, in any medium, provided that the
copyright notice and this permission notice are preserved,
thus giving the recipient permission to redistribute in turn.
diff --git a/README b/README
index b815aff..f6c7ca6 100644
--- a/README
+++ b/README
@@ -24,25 +24,25 @@ it is closed, and global, which are shared between all sessions.
Session-specific variables are typed, a pair of functions is provided
for setting and retrieveng variables od a particular type. For
example the function set_duration sets a duration variable, and
get_duration retrieves its value:
set beresp.ttl = variable.get_int("ttl");
Special functions are provided for testing if a variable is defined:
the defined() function returns true if the variable is defined, and
the type_of() function returns the type of the variable.
-A special fearure of this module are regset() and queryset()
+A special feature of this module are regset() and queryset()
functions. The regset() function allows you to parse a string
(e.g. a URL or header value) according to a regular expression
and to set several variables at once to selected substrings of
the input string, optionally converting between different types.
For example, the fragment below sets ttl and grace parameters of
the object according to the Surrogate-Control header:
variable.regset("ttl:d=\1s,grace:d=\2s",
"^(?:.*,)?max-age=([0-9]+)(?:+([0-9]+))",
beresp.http.Surrogate-Control);
set beresp.ttl = variable.get_duration("ttl");
set beresp.grace = variable.get_duration("grace");
@@ -154,25 +154,25 @@ VOID global_unset(STRING name)
VOID global_clear()
Unset all global variables
* vmod_variable vs. vmod_var
This module is backward-compatibile with vmod_var. To facilitate
transition, it uses the same naming scheme, so switching to use
vmod_variable in your VCL script is just a matter of replacing
s/var\./variable./
Main differences of vmod_variable from vmod_var:
-1. Both Varsnish 3 and 4 are supported;
+1. Both Varnish 3 and 4 are supported;
2. Variables are stored in hash tables with open addressing, to
speed up accesses (vmod_var keeps them in singly-linked lists).
3. Functions for testing existence and types of variables, and for
unsetting a variable: defined(), type_of() and unset()
4. The regset() and queryset() functions;
5. Additional functions for global variables: global_clear(),
global_defined() and global_unset().
diff --git a/src/vmod-variable.3 b/src/vmod-variable.3
index 5d5467d..f249ad3 100644
--- a/src/vmod-variable.3
+++ b/src/vmod-variable.3
@@ -40,25 +40,25 @@ patterns.
.PP
The \fBqueryset\fR function parses its input as a HTTP query string and
sets the variables defined in it.
.PP
The \fIglobal\fR variables are shared between all threads and sessions. They
can hold only string values.
.SH VMOD_VARIABLE VS. VMOD_VAR
This module doesn't share any code with \fBvmod_var\fR. Compared with
the latter, it provides the following new features:
.PP
.nr step 1 1
.IP \n[step].
-Both Varsnish 3 and 4 are supported;
+Both Varnish 3 and 4 are supported;
.IP \n+[step].
Variables are stored in hash tables with open addressing, to
speed up accesses (\fBvmod_var\fR keeps them in singly-linked lists).
.IP \n+[step].
Functions for testing existence and types of variables, and for
unsetting a variable:
.BR defined() ,
.BR type_of() ", and"
.BR unset() .
.IP \n+[step].
The \fBregset()\fR and \fBqueryset()\fR functions.
.IP \n+[step].

Return to:

Send suggestions and report system problems to the System administrator.