CACHE_TTL -> CACHING_TIMEOUT

Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
pull/66/head
Maxence Lange 2018-11-28 20:30:45 -01:00
rodzic 8102d81f91
commit 5947535544
2 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -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();

Wyświetl plik

@ -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;
}