[core] use buffer_eq_icase* funcs
[lighttpd.git] / src / mod_magnet_cache.h
blob04eb1ab18f5ab956134b1b27f76ab96f2a423ca8
1 #ifndef _MOD_MAGNET_CACHE_H_
2 #define _MOD_MAGNET_CACHE_H_
3 #include "first.h"
5 #include "base_decls.h"
6 #include "buffer.h"
8 #include <lua.h>
10 typedef struct {
11 buffer *name;
12 buffer *etag;
14 lua_State *L;
16 time_t last_used; /* LRU */
17 } script;
19 typedef struct {
20 script **ptr;
22 size_t used;
23 size_t size;
24 } script_cache;
26 script_cache *script_cache_init(void);
27 void script_cache_free(script_cache *cache);
29 lua_State *script_cache_get_script(server *srv, connection *con,
30 script_cache *cache, buffer *name);
32 #endif