refactored cache logic of products to Product API