Project

General

Profile

Bug #105555 ยป acquire-lock-for-pages-with-hash.patch

Marcel Macasso, 2024-11-12 13:38

View differences:

Classes/Controller/TypoScriptFrontendController.php
// a page cache entry, which we can use.
// To handle the second case - if our process had to wait for another one creating the content for us - we
// simply query the page cache again to see if there is a page cache now.
$hadToWaitForLock = $this->lock->acquireLock('pages', $this->newHash);
$hadToWaitForLock = $this->lock->acquireLock('pages_' . $this->newHash, $this->newHash);
// From this point on we're the only one working on that page.
if ($hadToWaitForLock) {
// Query the cache again to see if the data is there meanwhile: We did not get the lock
......
$this->getTimeTracker()->pull();
} else {
// User forced page cache rebuilding. Get a lock for the page content so other processes can't interfere.
$this->lock->acquireLock('pages', $this->newHash);
$this->lock->acquireLock('pages_' . $this->newHash, $this->newHash);
}
} else {
// Caching is not allowed. We'll rebuild the page. Lock this.
$this->lock->acquireLock('pages', $this->newHash);
$this->lock->acquireLock('pages_' . $this->newHash, $this->newHash);
}
$forceTemplateParsing = $this->context->getPropertyFromAspect('typoscript', 'forcedTemplateParsing');
    (1-1/1)