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, 8 months ago) by misho
Branches: lighttpd, MAIN
CVS tags: v1_4_41p8, HEAD
lighttpd 1.4.41

    1: #ifndef _MOD_MAGNET_CACHE_H_
    2: #define _MOD_MAGNET_CACHE_H_
    3: #include "first.h"
    4: 
    5: #include "buffer.h"
    6: #include "base.h"
    7: 
    8: #ifdef HAVE_LUA_H
    9: #include <lua.h>
   10: 
   11: typedef struct {
   12: 	buffer *name;
   13: 	buffer *etag;
   14: 
   15: 	lua_State *L;
   16: 
   17: 	time_t last_used; /* LRU */
   18: } script;
   19: 
   20: typedef struct {
   21: 	script **ptr;
   22: 
   23: 	size_t used;
   24: 	size_t size;
   25: } script_cache;
   26: 
   27: script_cache *script_cache_init(void);
   28: void script_cache_free(script_cache *cache);
   29: 
   30: lua_State *script_cache_get_script(server *srv, connection *con,
   31: 	       	script_cache *cache, buffer *name);
   32: 
   33: #endif
   34: #endif

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