File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / lighttpd / src / mod_magnet_cache.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Mon Oct 14 10:32:48 2013 UTC (10 years, 8 months ago) by misho
Branches: lighttpd, MAIN
CVS tags: v1_4_35p0, v1_4_35, v1_4_33, HEAD
1.4.33

    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: 
   10: typedef struct {
   11: 	buffer *name;
   12: 	buffer *etag;
   13: 
   14: 	lua_State *L;
   15: 
   16: 	time_t last_used; /* LRU */
   17: } script;
   18: 
   19: typedef struct {
   20: 	script **ptr;
   21: 
   22: 	size_t used;
   23: 	size_t size;
   24: } script_cache;
   25: 
   26: script_cache *script_cache_init(void);
   27: void script_cache_free(script_cache *cache);
   28: 
   29: lua_State *script_cache_get_script(server *srv, connection *con,
   30: 	       	script_cache *cache, buffer *name);
   31: 
   32: #endif
   33: #endif

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