kopia lustrzana https://github.com/nextcloud/social
CACHE_TTL -> CACHING_TIMEOUT
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>pull/66/head
rodzic
8102d81f91
commit
5947535544
|
@ -39,7 +39,7 @@ use OCP\DB\QueryBuilder\IQueryBuilder;
|
|||
class CacheDocumentsRequest extends CacheDocumentsRequestBuilder {
|
||||
|
||||
|
||||
const CACHE_TTL = 5; // 5 min
|
||||
const CACHING_TIMEOUT = 5; // 5 min
|
||||
|
||||
|
||||
/**
|
||||
|
@ -149,7 +149,7 @@ class CacheDocumentsRequest extends CacheDocumentsRequestBuilder {
|
|||
public function getNotCachedDocuments() {
|
||||
$qb = $this->getCacheDocumentsSelectSql();
|
||||
$this->limitToDBFieldEmpty($qb, 'local_copy');
|
||||
$this->limitToCaching($qb, self::CACHE_TTL);
|
||||
$this->limitToCaching($qb, self::CACHING_TIMEOUT);
|
||||
|
||||
$documents = [];
|
||||
$cursor = $qb->execute();
|
||||
|
|
|
@ -97,7 +97,7 @@ class DocumentService implements ICoreService {
|
|||
return $document;
|
||||
}
|
||||
|
||||
if ($document->getCaching() > (time() - (CacheDocumentsRequest::CACHE_TTL * 60))) {
|
||||
if ($document->getCaching() > (time() - (CacheDocumentsRequest::CACHING_TIMEOUT * 60))) {
|
||||
return $document;
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue