Updated cache logic
Updated cache logic