fixed clear-cache!, renamed cache functions