File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / lighttpd / src / mod_magnet_cache.h
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Wed Nov 2 10:35:00 2016 UTC (7 years, 7 months ago) by misho
Branches: lighttpd, MAIN
CVS tags: v1_4_41p8, HEAD
lighttpd 1.4.41

#ifndef _MOD_MAGNET_CACHE_H_
#define _MOD_MAGNET_CACHE_H_
#include "first.h"

#include "buffer.h"
#include "base.h"

#ifdef HAVE_LUA_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
#endif

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>