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
|
|
|
|
2018-03-25 07:45:05 +00:00
|
|
|
#include "base_decls.h"
|
2005-07-06 13:45:32 +00:00
|
|
|
#include "buffer.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 {
|
2019-10-27 06:14:46 +00:00
|
|
|
const buffer *ext;
|
|
|
|
const buffer *power_magnet;
|
|
|
|
/*const buffer *mc_namespace;*//*(unused)*/
|
|
|
|
#if defined(USE_MEMCACHED)
|
|
|
|
memcached_st *memc;
|
|
|
|
#endif
|
2005-07-06 13:45:32 +00:00
|
|
|
} plugin_config;
|
|
|
|
|
|
|
|
typedef struct {
|
2019-10-27 06:14:46 +00:00
|
|
|
PLUGIN_DATA;
|
|
|
|
plugin_config defaults;
|
|
|
|
plugin_config conf;
|
2006-10-04 13:26:23 +00:00
|
|
|
|
2019-10-27 06:14:46 +00:00
|
|
|
buffer basedir;
|
|
|
|
buffer baseurl;
|
|
|
|
buffer trigger_handler;
|
2005-07-06 13:45:32 +00:00
|
|
|
} plugin_data;
|
|
|
|
|
2020-01-13 02:51:12 +00:00
|
|
|
int cache_parse_lua(request_st *r, plugin_data *p, const buffer *fn);
|
2005-07-06 13:45:32 +00:00
|
|
|
|
|
|
|
#endif
|