Add tests for composite cache invalidation