Document TTL / Expiry

Not sure what I’m doing wrong, I’ve searched the forums and read the docs but my expiry doesn’t seem to work

 $result = $bucket->insert('doc', array('docType' => 'pendingCheckout',  'expiry' => 10 ));