Skip to content

Commit eca9e3f

Browse files
committed
Write _crawl_cache.page_hash when present
This is not present yet but will be added in the future.
1 parent 97e11a8 commit eca9e3f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/CrawlCache.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public static function addPathsIter( \Iterator $paths ) : \Iterator {
8888
$paths[] = $path;
8989
}
9090

91-
$placeholders = implode(',', array_fill(0, count($paths), '(%s,%s,%s,%s,%s,NULL,NOW())'));
91+
$placeholders = implode(',', array_fill(0, count($paths), '(%s,%s,%s,%s,%s,%s,NOW())'));
9292
$sql = "INSERT INTO $table_name (hashed_url,url,content_type,redirect_to,status,page_hash,time)
9393
VALUES $placeholders ON DUPLICATE KEY
9494
UPDATE url = VALUES(url), content_type = VALUES(content_type), redirect_to = VALUES(redirect_to), status = VALUES(status), page_hash = VALUES(page_hash), time = VALUES(time)";
@@ -102,6 +102,7 @@ public static function addPathsIter( \Iterator $paths ) : \Iterator {
102102
$path['content_type'],
103103
$path['redirect_to'],
104104
$path['status'],
105+
$path['content_hash'] ?? null,
105106
);
106107
}
107108

0 commit comments

Comments
 (0)