add cache to hold path

use cache to hold computed path to prevent duplex packet-in event