boop cache

This commit is contained in:
Christian Nieves
2024-05-02 16:18:14 +00:00
parent 5840cc2b2d
commit 0aef98bb0a
3 changed files with 58 additions and 51 deletions

View File

@ -1,4 +1,6 @@
local M = {}
local M = {
use_google_cache = nil,
}
function M.map(mode, lhs, rhs, opts)
local options = { noremap = true }
@ -10,7 +12,10 @@ function M.map(mode, lhs, rhs, opts)
end
function M.use_google()
return M.file_exists(os.getenv("HOME") .. "/use_google")
if M.use_google_cache == nil then
M.use_google_cache = M.file_exists(os.getenv("HOME") .. "/use_google")
end
return M.use_google_cache
end
function M.file_exists(name)