spec must be a tuple otherwise retrieval from cache fail as a list is not hashable