changed the way caching works