xref: /lighttpd1.4/src/mod_magnet_cache.h (revision 3392e8fb)
1 #ifndef _MOD_MAGNET_CACHE_H_
2 #define _MOD_MAGNET_CACHE_H_
3 #include "first.h"
4 
5 #include "base_decls.h"
6 #include "buffer.h"
7 
8 #include <lua.h>
9 
10 typedef struct {
11 	buffer *name;
12 	buffer *etag;
13 
14 	lua_State *L;
15 } script;
16 
17 typedef struct {
18 	script **ptr;
19 	uint32_t used;
20 	uint32_t size;
21 } script_cache;
22 
23 #if 0
24 __attribute_malloc__
25 __attribute_returns_nonnull__
26 script_cache *script_cache_init(void);
27 #endif
28 
29 void script_cache_free_data(script_cache *cache);
30 
31 lua_State *script_cache_get_script(script_cache *cache, buffer *name, int etag_flags);
32 
33 #endif
34