From: Steven Barth Date: Mon, 15 Sep 2008 17:03:04 +0000 (+0000) Subject: Optimized caching behaviour, automatically flush caches in dev environment X-Git-Tag: 0.8.0~80 X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=0dbf2f171bc6151bcb62c2c68fc5513b60e12b6a;p=project%2Fluci.git Optimized caching behaviour, automatically flush caches in dev environment --- diff --git a/Makefile b/Makefile index 558ee352bf..2c5a11cb0f 100644 --- a/Makefile +++ b/Makefile @@ -34,6 +34,7 @@ hostcopy: for i in $(MODULES); do cp -a $$i/hostfiles/* host/ -R 2>/dev/null || true; done rm -f host/luci ln -s .$(LUCI_MODULEDIR) host/luci + rm -rf /tmp/luci-* || true hostenv: host ucidefaults diff --git a/libs/core/luasrc/ccache.lua b/libs/core/luasrc/ccache.lua index 437d385256..83e82d9fdc 100644 --- a/libs/core/luasrc/ccache.lua +++ b/libs/core/luasrc/ccache.lua @@ -32,7 +32,7 @@ function cache_ondemand(...) end function cache_enable(cachepath, mode) - cachepath = cachepath or "/tmp/.luciccache" + cachepath = cachepath or "/tmp/luci-modulecache" mode = mode or "r--r--r--" local loader = package.loaders[2] diff --git a/libs/sgi-cgi/htdocs/cgi-bin/luci b/libs/sgi-cgi/htdocs/cgi-bin/luci index cd9bb59660..529d1d0bc5 100755 --- a/libs/sgi-cgi/htdocs/cgi-bin/luci +++ b/libs/sgi-cgi/htdocs/cgi-bin/luci @@ -1,5 +1,5 @@ #!/usr/bin/lua require "luci.cacheloader" require "luci.sgi.cgi" -luci.dispatcher.indexcache = "/tmp/.luciindex" +luci.dispatcher.indexcache = "/tmp/luci-indexcache" luci.sgi.cgi.run() \ No newline at end of file diff --git a/libs/web/root/etc/config/luci b/libs/web/root/etc/config/luci index b9efff35dd..40228b07fb 100644 --- a/libs/web/root/etc/config/luci +++ b/libs/web/root/etc/config/luci @@ -21,7 +21,7 @@ config extern flash_keep config internal languages config internal sauth - option sessionpath "/tmp/.lucisessions" + option sessionpath "/tmp/luci-sessions" option sessiontime 3600 config internal ccache @@ -29,6 +29,6 @@ config internal ccache config internal template option compiler_mode file - option compiledir "/tmp/.lucitplcache" + option compiledir "/tmp/luci-templatecache" config internal themes