Fixes #1162: removed constructors of cache dependency classes so that they can be easily created from configuration.