basiclly work with cache but not thread safe