title: Zf2 Redis Adapter, getItems using wildcards
body: <p>I'm making my first steps in using Redis under ZF2.
  I was wondering if there is a method to retrieve keys by pattern.</p>
  
  <p>e.g.:
  after setting multiple values with keys like: 'stackOverflow_'.time(), i would like to retrieve later all keys matching the 'stackOverflow_' pattern.</p>
  
  <p>tried using getItems(array $keys) with wildcard in: \vendor\zendframework\zendframework\library\Zend\Cache\Storage\Adapter\AbstractAdapter.php</p>
  
  <pre><code>$redisKeyPattern = 'stackOverflow_'; 
  $redis = $this-&gt;getServiceLocator()-&gt;get('Redis');
  $values = $redis-&gt;getItems(array($redisKeyPattern.'*'));
  </code></pre>
  
  <p>with no succces.</p>
  
  <p>any ideas? </p>
  
  <hr>
  
  <p>UDPATE:
  thanks guys. i ended up with duplicating the Redis adapter and adding my own functionality that utilizes the 'keys' function in the Redis extension:</p>
  
  <pre><code> public function getItemsByKeyPattern($pattern) {
  
      $keys = $this-&gt;getRedisResource()-&gt;keys('*'.$pattern.'*'); 
      if(empty($keys)) return null;
  
      foreach($keys as &amp;$key){        
          $key = explode(':', $key)[1];
      }
  
      $items = parent::getItems($keys);
      return $items;
  }
  </code></pre>
  
  <p>and it works for me :)</p>