[#1356] Disable caching for local resources

1. Discover if component is not cacheable (either local resource or branch), and skip caching
2. Add new test and force existing tests to use cache, even they use local resources

Should fix #1356, among others.