summaryrefslogtreecommitdiff
path: root/src/mod_magnet_cache.h
diff options
context:
space:
mode:
authorJan Kneschke <jan@kneschke.de>2006-09-10 22:01:43 +0000
committerJan Kneschke <jan@kneschke.de>2006-09-10 22:01:43 +0000
commitdaeab348cdcbc64c104a6f02accda827668f7024 (patch)
treee6712549009c81fa1618d02f2e5d6831f6314be0 /src/mod_magnet_cache.h
parent1311a6137f23cd88ff55a61a9150e8a0b3efb6dd (diff)
downloadlighttpd-git-daeab348cdcbc64c104a6f02accda827668f7024.tar.gz
added mod_magnet
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.11-ssl-fixes@1292 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'src/mod_magnet_cache.h')
-rw-r--r--src/mod_magnet_cache.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/mod_magnet_cache.h b/src/mod_magnet_cache.h
new file mode 100644
index 00000000..20d22d40
--- /dev/null
+++ b/src/mod_magnet_cache.h
@@ -0,0 +1,31 @@
+#ifndef _MOD_MAGNET_CACHE_H_
+#define _MOD_MAGNET_CACHE_H_
+
+#include <lua.h>
+
+#include "buffer.h"
+#include "base.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