Check if cache cid exist
What database backend are you using? Sounds like a case problem, that a cache entry with a different upper/lower case version exists and then it can't map that back. I'd suggest using only lowercase but this shouldn't happen IMHO and it doesn't for me:

&gt;&gt;&gt; $cache = \Drupal::cache();
=&gt; Drupal\Core\Cache\DatabaseBackend {#48
     +"_serviceId": "cache.default",
   }
&gt;&gt;&gt; $cache-&gt;get('foo');
=&gt; false
&gt;&gt;&gt; $cache-&gt;set('foo', 'bar');
=&gt; null
&gt;&gt;&gt; $cache-&gt;get('foo');
=&gt; {#9809
     +"cid": "foo",
     +"data": "bar",
     +"created": "1505412278.945",
     +"expire": "-1",
     +"serialized": "0",
     +"tags": [],
     +"checksum": "0",
     +"valid": true,
   }
&gt;&gt;&gt; $cache-&gt;get('Foo');
=&gt; false