• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/router/lighttpd-1.4.39/src/
1#ifndef _MOD_MAGNET_CACHE_H_
2#define _MOD_MAGNET_CACHE_H_
3
4#include "buffer.h"
5#include "base.h"
6
7#ifdef HAVE_LUA_H
8#include <lua.h>
9
10typedef struct {
11	buffer *name;
12	buffer *etag;
13
14	lua_State *L;
15
16	time_t last_used; /* LRU */
17} script;
18
19typedef struct {
20	script **ptr;
21
22	size_t used;
23	size_t size;
24} script_cache;
25
26script_cache *script_cache_init(void);
27void script_cache_free(script_cache *cache);
28
29lua_State *script_cache_get_script(server *srv, connection *con,
30	       	script_cache *cache, buffer *name);
31
32#endif
33#endif
34