Website Summary Files Commits Branches @commit @diff @stats
path: root / models / webpage.php
diff options
context:
space:
mode:
Commit04b77a264f8d7fbc9069ad96fa1a448f1f3ecb12 (patch)
Author
 Georgi Nikolov <ggeorgi60@gmail.com>
2025-01-25 12:04:13 +0200
Committer
 Georgi Nikolov <ggeorgi60@gmail.com>
2025-01-25 12:04:13 +0200
Files274ac22ff284c03b6b733bdf557d0644ef114108 /models/webpage.php
nowayforward_human-04b77a264f8d7fbc9069ad96fa1a448f1f3ecb12.tar
nowayforward_human-04b77a264f8d7fbc9069ad96fa1a448f1f3ecb12.tar.gz
nowayforward_human-04b77a264f8d7fbc9069ad96fa1a448f1f3ecb12.zip
Parent61d6cd57804dc059e2718cae19a97dc40bc83756 (diff)
Added caching of the pages
When a page is downloaded if the resources already exist in the system they will not be downloaded again
1 files changed, 9 insertions, 0 deletions
-rw-r--r--models/webpage.php9
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',