Where exactly did it solidify on the cap,inside the head or valve cover outside?
If its on the cap or outside on the valve cover you might be able to use some engine degreaser. If oil has burned onto the cap or valve cover it will be harder to remove and might have to look at your local auto parts store and find a heavy duty engine cleaner. I used to soak greased up parts in a little bit of gasoline too but your have to me more careful when using gasoline as it can destroy seals and gaskets and of course ignite.
Some people recommend break cleaner that leaves no residue yet I could not vouch for this.