1. A method for a switching element that forwards packets, the method comprising: receiving a packet; initializing a plurality of match fields as wildcard fields; dynamically generating a flow entry by un-wildcarding each match field that is consulted in generating the flow entry, wherein the flow entry is associated with an action; performing the action on the packet; and storing the flow entry in a cache to process any subsequent packet that matches each non-wildcard field of the flow entry.