added unit tests for the caching framework (backported from FLOW3)