Utility for serialization of dictionaries/kwargs as cache parameter.