Fix use of cache