<commit_before>==========
vmod_redis
==========

--------------------
Varnish Redis Module
--------------------

:Author: <NAME>
:Date: 2014-08-22
:Version: 0.1
:Manual section: 3

SYNOPSIS
========

import redis;

DESCRIPTION
===========

VMOD using the synchronous hiredis library API (https://github.com/redis/hiredis) to access Redis servers from VCL.

Highlights:

* **All Redis commands are supported**. Two VMOD APIs are provided: ``redis.call()`` for simple commands, and ``redis.command()`` + ``redis.server()`` + ``redis.push()`` + ``redis.execute()`` for advanced execution.<commit_msg>Added function prototypes to README.rst<commit_after>==========
vmod_redis
==========

--------------------
Varnish Redis Module
--------------------

:Author: <NAME>
:Date: 2014-08-22
:Version: 0.1
:Manual section: 3

SYNOPSIS
========

import redis;

::

    # Configuration.
    Function VOID init(TAG, HOST, PORT, TIMEOUT, TTL)
    Function VOID add_server(TAG, HOST, PORT, TIMEOUT, TTL)
    Function VOID set_max_connections(LIMIT)

    # Simple command execution.
    Function VOID call(COMMAND + ARGUMENTS)

    # Advanced command execution.
    Function VOID command(COMMAND)
    Function VOID server(TAG)
    Function VOID push(ARGUMENT)
    Function VOID execute()

    # Access to replies.
    Function BOOL reply_is_error()
    Function BOOL reply_is_nil()
    Function BOOL reply_is_status()
    Function BOOL reply_is_integer()
    Function BOOL reply_is_string()
    Function BOOL reply_is_array()

    Function STRING get_reply()

    Function STRING get_error_reply()
    Function STRING get_status_reply()
    Function INT get_integer_reply()
    Function STRING get_string_reply()

    Function INT get_array_reply_length()
    Function BOOL array_reply_is_error(INDEX)
    Function BOOL array_reply_is_nil(INDEX)
    Function BOOL array_reply_is_status(INDEX)
    Function BOOL array_reply_is_integer(INDEX)
    Function BOOL array_reply_is_string(INDEX)
    Function BOOL array_reply_is_array(INDEX)
    Function STRING get_array_reply_value(INDEX)

    # Other.
    Function VOID free()

DESCRIPTION
===========

VMOD using the synchronous hiredis library API (https://github.com/redis/hiredis) to access Redis servers from VCL.

Highlights:

* **All Redis commands are supported**. Two VMOD APIs are provided: ``redis.call()`` for simple commands, and ``redis.command()`` + ``redis.server()`` + ``redis.push()`` + ``redis.execute()`` for advanced execution.
{'fraction_non_alphanumeric': 0.15502624142107388, 'fraction_numerical': 0.008881711748082357, 'mean_word_length': 3.793036750483559, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3331716', 'n_tokens_mistral': 803, 'n_tokens_neox': 746, 'n_words': 217}