Made cache TTL configurable.