2005-07-06 13:45:32 +00:00
|
|
|
#ifndef _MOD_CACHE_H_
|
|
|
|
#define _MOD_CACHE_H_
|
2016-03-19 15:14:35 +00:00
|
|
|
#include "first.h"
|
2005-07-06 13:45:32 +00:00
|
|
|
|
|
|
|
#include "buffer.h"
|
|
|
|
#include "server.h"
|
|
|
|
#include "response.h"
|
|
|
|
|
|
|
|
#include "stream.h"
|
2005-07-15 17:46:13 +00:00
|
|
|
#include "plugin.h"
|
2005-07-06 13:45:32 +00:00
|
|
|
|
2016-01-03 14:48:11 +00:00
|
|
|
#if defined(USE_MEMCACHED)
|
|
|
|
#include <libmemcached/memcached.h>
|
2005-07-09 20:17:07 +00:00
|
|
|
#endif
|
|
|
|
|
2005-07-06 13:45:32 +00:00
|
|
|
#define plugin_data mod_cache_plugin_data
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
buffer *ext;
|
2006-10-04 13:26:23 +00:00
|
|
|
|
2005-07-09 20:17:07 +00:00
|
|
|
array *mc_hosts;
|
|
|
|
buffer *mc_namespace;
|
2016-01-03 14:48:11 +00:00
|
|
|
#if defined(USE_MEMCACHED)
|
|
|
|
memcached_st *memc;
|
2005-07-09 20:17:07 +00:00
|
|
|
#endif
|
2005-12-29 12:16:10 +00:00
|
|
|
buffer *power_magnet;
|
2005-07-06 13:45:32 +00:00
|
|
|
} plugin_config;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
PLUGIN_DATA;
|
2006-10-04 13:26:23 +00:00
|
|
|
|
2005-07-06 13:45:32 +00:00
|
|
|
buffer *basedir;
|
2005-07-11 11:03:12 +00:00
|
|
|
buffer *baseurl;
|
2006-10-04 13:26:23 +00:00
|
|
|
|
2005-07-06 13:45:32 +00:00
|
|
|
buffer *trigger_handler;
|
2006-10-04 13:26:23 +00:00
|
|
|
|
2005-07-06 13:45:32 +00:00
|
|
|
plugin_config **config_storage;
|
2006-10-04 13:26:23 +00:00
|
|
|
|
|
|
|
plugin_config conf;
|
2005-07-06 13:45:32 +00:00
|
|
|
} plugin_data;
|
|
|
|
|
2005-07-15 17:46:13 +00:00
|
|
|
int cache_parse_lua(server *srv, connection *con, plugin_data *p, buffer *fn);
|
2005-07-06 13:45:32 +00:00
|
|
|
|
|
|
|
#endif
|