title: How to set memcached options in Yii2?
body: <p>I'm trying to set a Memcached option (disable compression) in the config file, but Yii2 keeps throwing an error.  What am I doing wrong?</p>
  
  <p>Here is the config:</p>
  
  <pre><code>'cache' =&gt; [
      /* 'class' =&gt; 'yii\caching\FileCache', */
      'class' =&gt; 'yii\caching\MemCache',
      'servers' =&gt; [
          [
              'host' =&gt; 'localhost',
              'port' =&gt; 11211,
          ],
      ],
      'useMemcached' =&gt; true,
      'serializer' =&gt; false,
      'options' =&gt; [
          'Memcached::OPT_COMPRESSION' =&gt; false,
      ],
  ],
  </code></pre>
  
  <p>And the error:
  <em>'yii\base\ErrorException' with message 'Memcached::setOptions(): invalid configuration option'</em></p>
  
  <p>Any ideas?</p>
  
  <p>If I do the same thing in plain PHP, it works just fine:</p>
  
  <pre><code>$memcache = new \Memcached;
  $memcache-&gt;setOption(\Memcached::OPT_COMPRESSION, false);
  $memcache-&gt;addServers(
      array(
          array("HOST" =&gt; "127.0.0.1", "PORT" =&gt; 11211),
      )
  );
  </code></pre>