cache and variable implemented