public function __construct(KeyValueStore $cache1, KeyValueStore $cache2 = null) { $caches = func_get_args(); $caches = array_filter($caches); $this->caches = $caches; }