From 04b77a264f8d7fbc9069ad96fa1a448f1f3ecb12 Mon Sep 17 00:00:00 2001 From: Georgi Nikolov Date: Sat, 25 Jan 2025 12:04:13 +0200 Subject: Added caching of the pages When a page is downloaded if the resources already exist in the system they will not be downloaded again --- models/webpage.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'models/webpage.php') diff --git a/models/webpage.php b/models/webpage.php index 46c8407..1a2f4a6 100644 --- a/models/webpage.php +++ b/models/webpage.php @@ -42,6 +42,15 @@ class Webpage extends Table { ); } + static function getArchivePathsByPattern(string $URLPattern) : array { + return Table::_get_all( + 'Webpages', + 'Database\Webpage', + "WHERE URL LIKE \"$URLPattern\" ORDER BY Date DESC", + "Path, WID" + ); + } + function incrementVisits() { Table::_update( 'Webpages', -- cgit v1.2.3