From 673f38246ac3548caefec41183e3dd7477d9f6f6 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 13 Sep 2022 23:50:12 +0200 Subject: treewide: separate Lua runtime resources Move classes required for Lua runtime support into a new `luci-lua-runtime` package. Also replace the `luci.http` and `luci.util` classes in `luci-lib-base` with stubbed versions interacting with the ucode based runtime environment. Finally merge `luci-base-ucode` into the remainders of `luci-base`. Signed-off-by: Jo-Philipp Wich --- modules/luci-lua-runtime/luasrc/cacheloader.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 modules/luci-lua-runtime/luasrc/cacheloader.lua (limited to 'modules/luci-lua-runtime/luasrc/cacheloader.lua') diff --git a/modules/luci-lua-runtime/luasrc/cacheloader.lua b/modules/luci-lua-runtime/luasrc/cacheloader.lua new file mode 100644 index 0000000000..7ef971df8d --- /dev/null +++ b/modules/luci-lua-runtime/luasrc/cacheloader.lua @@ -0,0 +1,12 @@ +-- Copyright 2008 Steven Barth +-- Copyright 2008 Jo-Philipp Wich +-- Licensed to the public under the Apache License 2.0. + +local config = require "luci.config" +local ccache = require "luci.ccache" + +module "luci.cacheloader" + +if config.ccache and config.ccache.enable == "1" then + ccache.cache_ondemand() +end -- cgit v1.2.3