fix behavior metadata not getting correctly applied and cache creation ordering

Signed-off-by: Chris Granger <ibdknox@gmail.com>