Handle double caching correctly