<commit_before>/*
 * Caching HTTP responses.  Memcached choice backend.
 *
 * author: <NAME> <<EMAIL>>
 */

#include "http-cache-choice.h"
#include "http-cache-internal.h"
#include "memcached-stock.h"
#include "memcached-client.h"
#include "tpool.h"
#include "format.h"
#include "strmap.h"
#include "strref.h"
#include "serialize.h"
#include "growing-buffer.h"
#include "sink-buffer.h"
#include "uset.h"
#include "istream.h"

#include <glib.h>

enum {
    CHOICE_MAGIC = 4,
};

struct http_cache_choice {
    struct pool *pool;

    struct memcached_stock *stock;

    const char *uri;
    const char *key;

    const struct strmap *request_headers;

    struct strref data;

    struct memcached_set_extras extras;

    union {
        http_cache_choice_get_t get;
        http_cache_choice_commit_t commit;
        http_cache_choice_filter_t filter;<commit_msg>http-cache-choice: add missing stdio.h include<commit_after>/*
 * Caching HTTP responses.  Memcached choice backend.
 *
 * author: <NAME> <<EMAIL>>
 */

#include "http-cache-choice.h"
#include "http-cache-internal.h"
#include "memcached-stock.h"
#include "memcached-client.h"
#include "tpool.h"
#include "format.h"
#include "strmap.h"
#include "strref.h"
#include "serialize.h"
#include "growing-buffer.h"
#include "sink-buffer.h"
#include "uset.h"
#include "istream.h"

#include <glib.h>
#include <stdio.h>

enum {
    CHOICE_MAGIC = 4,
};

struct http_cache_choice {
    struct pool *pool;

    struct memcached_stock *stock;

    const char *uri;
    const char *key;

    const struct strmap *request_headers;

    struct strref data;

    struct memcached_set_extras extras;

    union {
        http_cache_choice_get_t get;
        http_cache_choice_commit_t commit;
        http_cache_choice_filter_t filter;
{'fraction_non_alphanumeric': 0.12260967379077616, 'fraction_numerical': 0.0011248593925759281, 'mean_word_length': 3.7694369973190347, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, 'https://': 0, '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': '5660230', 'n_tokens_mistral': 650, 'n_tokens_neox': 633, 'n_words': 149}