Add cache invalidation, and update cache-put methods.