Below code works as expected on localhost, basically i check for cache key if exist it returns the value, if its not, it gets the value from database then i set 2 cache keys