1 #ifndef _MOD_CACHE_H_
2 #define _MOD_CACHE_H_
3 
4 #include "buffer.h"
5 #include "server.h"
6 #include "response.h"
7 
8 #include "stream.h"
9 #include "plugin.h"
10 
11 #if defined(HAVE_MEMCACHE_H)
12 #include <memcache.h>
13 #endif
14 
15 #define plugin_data mod_cache_plugin_data
16 
17 typedef struct {
18 	buffer *ext;
19 
20 	array  *mc_hosts;
21 	buffer *mc_namespace;
22 #if defined(HAVE_MEMCACHE_H)
23 	struct memcache *mc;
24 #endif
25 	buffer *power_magnet;
26 } plugin_config;
27 
28 typedef struct {
29 	PLUGIN_DATA;
30 
31 	buffer *basedir;
32 	buffer *baseurl;
33 
34 	buffer *trigger_handler;
35 
36 	plugin_config **config_storage;
37 
38 	plugin_config conf;
39 } plugin_data;
40 
41 int cache_parse_lua(server *srv, connection *con, plugin_data *p, buffer *fn);
42 
43 #endif
44