factored out local cache storage into lcs module