title: check if object exists in Cloud Files (PHP API)
body: <p>I've just started working with the PHP API for Rackspace Cloud Files. So far so good-- but I am using it as sort of a poor man's memcache, storing key/value pairs of serialized data.</p>
  
  <p>My app attempts to grab the existing cached object by its key ('name' in the API language) using something like this:</p>
  
  <pre><code>$obj = $this-&gt;container-&gt;get_object($key);
  </code></pre>
  
  <p>The problem is, if the object doesn't exist, the API throws a fatal error rather than simply returning <code>false</code>. The "right" way to do this by the API would probably be to do a</p>
  
  <pre><code>$objs = $this-&gt;container-&gt;list_objects();
  </code></pre>
  
  <p>and then check for my <code>$key</code> value in that list. However, this seems way more time/CPU intensive than just returning <code>false</code> from the <code>get_object</code> request.</p>
  
  <p>Is there a way to do a "search for object" or "check if object exists" in Cloud Files?</p>
  
  <p>Thanks  </p>