mirror of
https://github.com/friendica/friendica
synced 2025-04-22 13:50:12 +00:00
Move Cache::set() to DI::cache()->set()
This commit is contained in:
parent
3369dfaad9
commit
f68929633b
16 changed files with 25 additions and 39 deletions
|
@ -59,9 +59,9 @@ class Index extends BaseSearchModule
|
|||
if (($resultdata->time > (time() - $crawl_permit_period)) && ($resultdata->accesses > $free_crawls)) {
|
||||
throw new HTTPException\TooManyRequestsException(L10n::t('Only one search per minute is permitted for not logged in users.'));
|
||||
}
|
||||
Cache::set('remote_search:' . $remote, json_encode(['time' => time(), 'accesses' => $resultdata->accesses + 1]), CacheClass::HOUR);
|
||||
DI::cache()->set('remote_search:' . $remote, json_encode(['time' => time(), 'accesses' => $resultdata->accesses + 1]), CacheClass::HOUR);
|
||||
} else {
|
||||
Cache::set('remote_search:' . $remote, json_encode(['time' => time(), 'accesses' => 1]), CacheClass::HOUR);
|
||||
DI::cache()->set('remote_search:' . $remote, json_encode(['time' => time(), 'accesses' => 1]), CacheClass::HOUR);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue