Pagecache for frequently fetched pages

This commit is contained in:
Michael 2022-09-06 06:04:41 +00:00
parent 934a3a6721
commit 6eb9dff807
11 changed files with 151 additions and 26 deletions

View file

@ -38,6 +38,7 @@ use Friendica\Model\Verb;
use Friendica\Module\BaseSettings;
use Friendica\Network\HTTPException;
use Friendica\Protocol\Activity;
use Friendica\Util\Network;
use Friendica\Util\Temporal;
use Friendica\Worker\Delivery;
@ -373,7 +374,7 @@ class Account extends BaseSettings
// or the handle of the account, therefore we check for either
// "http" or "@" to be present in the string.
// All other fields from the row will be ignored
if ((strpos($csvRow[0], '@') !== false) || in_array(parse_url($csvRow[0], PHP_URL_SCHEME), ['http', 'https'])) {
if ((strpos($csvRow[0], '@') !== false) || Network::isValidHttpUrl($csvRow[0])) {
Worker::add(PRIORITY_MEDIUM, 'AddContact', local_user(), $csvRow[0]);
} else {
Logger::notice('Invalid account', ['url' => $csvRow[0]]);