Trying to cache variables