Changeset 464
- Timestamp:
- 07/17/2005 10:07:53 AM (3 years ago)
- Files:
-
- 1 modified
-
branches/lighttpd-1.3.x/doc/cml.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/lighttpd-1.3.x/doc/cml.txt
r458 r464 103 103 cwd = request["CWD"] 104 104 105 output_include = { b +"_cache.html" }105 output_include = { b .. "_cache.html" } 106 106 107 107 trigger_handler = "index.php" 108 108 109 if file_mtime(b + "../lib/php/menu.csv") > file_mtime(cwd +"_cache.html") or110 file_mtime(b + "templates/jk.tmpl") > file.mtime(cwd +"_cache.html")111 file.mtime(b + "content.html") > file.mtime(cwd +"_cache.html") then109 if file_mtime(b .. "../lib/php/menu.csv") > file_mtime(cwd .. "_cache.html") or 110 file_mtime(b .. "templates/jk.tmpl") > file.mtime(cwd .. "_cache.html") 111 file.mtime(b .. "content.html") > file.mtime(cwd .. "_cache.html") then 112 112 return 1 113 113 else … … 145 145 cwd = request["CWD"] 146 146 147 output_include = { cwd +"head.html",148 cwd +"menu.html",149 cwd +"spacer.html",150 cwd +"db-content.html",151 cwd +"spacer2.html",152 cwd +"news.html",153 cwd +"footer.html" }147 output_include = { cwd .. "head.html", 148 cwd .. "menu.html", 149 cwd .. "spacer.html", 150 cwd .. "db-content.html", 151 cwd .. "spacer2.html", 152 cwd .. "news.html", 153 cwd .. "footer.html" } 154 154 155 155 return 0 … … 160 160 ============ 161 161 162 You need `lua <http://www.lua.org/>`_ and should install `<libmemcache-1.3.x http://people.freebsd.org/~seanc/libmemcache/>` 163 and have to configure lighttpd with: :: 162 You need `lua <http://www.lua.org/>`_ and should install `libmemcache-1.3.x <http://people.freebsd.org/~seanc/libmemcache/>`_ and have to configure lighttpd with: :: 164 163 165 164 ./configure ... --with-lua --with-memcache … … 212 211 the standard error-page use ``server.errorfile-prefix``. 213 212 214 Examples215 ========216 217 Using the memcache-udf for MySQL we can do: ::218 219 output_contenttype = "text/html"220 output_include = { "cache-hit.html" }221 222 trigger_handler = "generate.php"223 224 if get["page"] == memcache_get_string("123") then225 return 0226 else227 return 1228 end229 230 In MySQL you do: ::231 232 SELECT memcache_set("127.0.0.1:11211", "123", "12");233 234 or to retrieve a value: ::235 236 SELECT memcache_get("127.0.0.1:11211", "123");237 238 You can get the mysql udf at `jan's mysql page <http://jan.kneschke.de/projects/mysql/udf/>`_.

