Merge changes I57d47a05,I818f18fe

* changes:
  Add support for user-defined cache path.
  Add tests for Allocation.