diff options
Diffstat (limited to 'data/lighttpd/lighttpd-1.4.53/src/mod_magnet_cache.h')
-rw-r--r-- | data/lighttpd/lighttpd-1.4.53/src/mod_magnet_cache.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/data/lighttpd/lighttpd-1.4.53/src/mod_magnet_cache.h b/data/lighttpd/lighttpd-1.4.53/src/mod_magnet_cache.h new file mode 100644 index 000000000..04eb1ab18 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/src/mod_magnet_cache.h @@ -0,0 +1,32 @@ +#ifndef _MOD_MAGNET_CACHE_H_ +#define _MOD_MAGNET_CACHE_H_ +#include "first.h" + +#include "base_decls.h" +#include "buffer.h" + +#include <lua.h> + +typedef struct { + buffer *name; + buffer *etag; + + lua_State *L; + + time_t last_used; /* LRU */ +} script; + +typedef struct { + script **ptr; + + size_t used; + size_t size; +} script_cache; + +script_cache *script_cache_init(void); +void script_cache_free(script_cache *cache); + +lua_State *script_cache_get_script(server *srv, connection *con, + script_cache *cache, buffer *name); + +#endif |