Closure work and reuse of cache variables