cache refactoring for better plugin friendliness
Merge pull request #219 from prymitive/legion_cache_plugin

cache refactoring for better plugin friendliness