VMOD dict − Dictionary look-up for Varnish Cache
import dict [as name] [from "path"] VOID ci(BOOL v) VOID collisions(INT n) VOID load(STRING file) VOID clear() STRING lookup(STRING key)
Provides simple key/value dictionary API. The dictionary is kept in a disk file. Each non−empty line in such a file is either a comment or a pair of keyword − value separated by one or more whitespace characters. Leading and trailing whitespace is discarded. Comments are introduced by a hash sign at the beginning of the line. Empty lines and comments are ignored.
If v is true, sets case−insensitive string comparison. Default is case−sensitive comparison.
Sets the maximum allowable length of collision chain in the hash table. Negative value of n means unlimited length. Otherwise, the module will adjust the hash table load factor to ensure the number of collisions doesn't exceed n.
Loads key/value dictionary from file into memory. The file must exist and be readable for the user varnish runs as.
This function is normally called from vcl_init.
Clears entire dictionary.
Looks up the key in the table loaded by the dict.load. Returns the value if found, or NULL otherwise.
Stable versions of vmod_dict can be downloaded from https://download.gnu.org.ua/release/vmod−dict.
Git repository is available at http://git.gnu.org.ua/cgit/vmod−dict.git.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Manpage server at man.gnu.org.ua.
Powered by mansrv 1.1