Incorrect comparison done for cache expiration