refactored cache call to be event triggered