SELECT cID, cvID, arHandle FROM CollectionVersionBlocks WHERE bID=X
$rows=$db->getAll( 'SELECT cID, cvID, arHandle FROM CollectionVersionBlocks WHERE bID='.intval($this->getBlockID()) );
public function refreshCacheAll() { $db = Loader::db(); $bID = $this->getBlockID(); $rs=$db->Execute( 'SELECT cID, cvID, arHandle FROM CollectionVersionBlocks WHERE bID='.intval($bID) ); while (!$rs->EOF){ Cache::delete('block', $bID . ':' . intval($rs->fields['cID']) . ':' . intval($rs->fields['cvID']) . ':' . $rs->fields['arHandle'] ); Cache::delete('block_view_output', $rs->fields['cID'] . ':' . $bID . ':' . $rs->fields['arHandle']); Cache::delete('collection_blocks', $rs->fields['cID'] . ':' . $rs->fields['cvID']); Cache::delete('block', $bID); $rs->MoveNext(); } }
It seems that the delete function from the CollectionVersion object can take up to 5 seconds to run?!
Any suggestion on making the DB transactions faster?