summaryrefslogtreecommitdiff
path: root/src/mod_cml.h
blob: 1afd708de112874a6a155c475611f32e551f0723 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef _MOD_CACHE_H_
#define _MOD_CACHE_H_

#include "buffer.h"
#include "server.h"
#include "response.h"

#include "stream.h"
#include "plugin.h"

#if defined(HAVE_MEMCACHE_H)
#include <memcache.h>
#endif

#define plugin_data mod_cache_plugin_data

typedef struct {
	buffer *ext;

	array  *mc_hosts;
	buffer *mc_namespace;
#if defined(HAVE_MEMCACHE_H)
	struct memcache *mc;
#endif
	buffer *power_magnet;
} plugin_config;

typedef struct {
	PLUGIN_DATA;

	buffer *basedir;
	buffer *baseurl;

	buffer *trigger_handler;

	plugin_config **config_storage;

	plugin_config conf;
} plugin_data;

int cache_parse_lua(server *srv, connection *con, plugin_data *p, buffer *fn);

#endif