added cache exceptions as parameter