Work on pluggable model cache. Mostly just moving around glue code, soit won't take long. (commit: e484cca)