public function clearCacheTree($record, $key = null)
 {
     if (!$key) {
         $key = static::getCacheKey($record['Handle'], $record['ParentID'], $record['Site'] == 'Remote');
     }
     Cache::delete($key);
     // iterate child collections
     $childCollectionsKey = static::getCacheKey('.*', $record['ID'], $record['Site'] == 'Remote');
     foreach (CacheIterator::getIterator('|^' . $childCollectionsKey . '|') as $childCollection) {
         if ($childCollection['value']) {
             static::clearCacheTree($childCollection['value'], $childCollection['key']);
         }
     }
     // iterate child files
     $childFilesKey = SiteFile::getCacheKey($record['ID'], '.*');
     foreach (CacheIterator::getIterator('|^' . $childFilesKey . '|') as $childFile) {
         if ($childFile['value']) {
             Cache::delete($childFile['key']);
         }
     }
 }