title: Unable to retrieve a cached piece of information that was saved with Laravel app, but trying to get within a phalcon app
body: <p>I am trying to save a string with one application to memcached.  And then after an http redirect, trying to retrieve that information from a different application on the same server. I am able to save, but retrieving the information is not working.</p>
  
  <p>I have made sure that both applications are not applying a prefix to the cache key. I have run 'memcached-tool localhost:11211 dump | less' on the memcache server to ensure the data exists, which it does.  I can access the data from the same application that saves the data. So if I save from the Laravel app, I can retrieve from the laravel app, and vice versa for the phalcon app.</p>
  
  <p>The environment variables used are the same in both apps.</p>
  
  <p>Setup in Laravel (cache.php):</p>
  
  <pre><code>'memcached' =&gt; [
              'driver' =&gt; 'memcached',
              'servers' =&gt; [
                  [
                      'host' =&gt; env('MEMCACHED_HOST', '127.0.0.1'),
                      'port' =&gt; env('MEMCACHED_PORT', 11211),
                      'weight' =&gt; 0,
                  ],
              ],
          ],
  </code></pre>
  
  <p>How I am saving in Laravel:</p>
  
  <pre><code>Cache::put($sha, $viewData, 60);
  return redirect("someUrl/{$sha}", 302);
  </code></pre>
  
  <p>Setup in Phalcon:</p>
  
  <pre><code>$di-&gt;setShared('memcached', function(){
      // Cache data for one hour
      $frontCache = new \Phalcon\Cache\Frontend\Data(
          [
              'lifetime' =&gt; 60,
              'prefix' =&gt; ''
          ]
      );
  
  // Create the component that will cache 'Data' to a 'Memcached' backend
  // Memcached connection settings
      return new \Phalcon\Cache\Backend\Libmemcached(
          $frontCache,
          [
              'prefix' =&gt; '',
              'servers' =&gt; [
                  [
                      'host'   =&gt; MEMCACHED_SERVER,
                      'port'   =&gt; MEMCACHED_PORT,
                      'weight' =&gt; 0,
                  ]
              ]
          ]
      );
  });
  </code></pre>
  
  <p>How I am trying to retrieve info in Phalcon:</p>
  
  <pre><code>$cache = $this-&gt;di-&gt;getShared('memcached');
  $info = $cache-&gt;get($cacheKey);
  </code></pre>
  
  <p>Here is the output of the $cache var from xdebug:</p>
  
  <pre><code>Phalcon\Cache\Backend\Libmemcached::__set_state(array(
     '_frontend' =&gt; 
    Phalcon\Cache\Frontend\Data::__set_state(array(
       '_frontendOptions' =&gt; 
      array (
        'lifetime' =&gt; 60,
        'prefix' =&gt; '',
      ),
    )),
     '_options' =&gt; 
    array (
      'prefix' =&gt; '',
      'servers' =&gt; 
      array (
        0 =&gt; 
        array (
          'host' =&gt; 'servername',
          'port' =&gt; port,
          'weight' =&gt; 0,
        ),
      ),
      'statsKey' =&gt; '',
    ),
     '_prefix' =&gt; '',
     '_lastKey' =&gt; '38404efbc4fb72ca9cd2963d1e811e95fe76960b',
     '_lastLifetime' =&gt; NULL,
     '_fresh' =&gt; false,
     '_started' =&gt; false,
     '_memcache' =&gt; 
    Memcached::__set_state(array(
    )),
  ))
  </code></pre>
  
  <p>And here is the dump from memcached-tool:</p>
  
  <pre><code>Dumping memcache contents
  add 38404efbc4fb72ca9cd2963d1e811e95fe76960b 4 1562346522 144
  a:5:{s:3:"zip";s:0:"";s:10:"first_name";s:5:"Clint";s:9:"last_name";s:9:"Broadhead";s:5:"phone";s:0:"";s:5:"email";s:20:"blah@blah.com";}
  </code></pre>
  
  <p>I expected to be able to save to memcache from any application and then retrieve that cache from anywhere else that has access to the same server.  But when I try to retrieve in the phalcon app I receive 'null'.  Even though I can see the key/value pair on the server.  Thanks in advance for your assistance.</p>