Skip to content
This repository was archived by the owner on Aug 19, 2024. It is now read-only.

Use post process hook#8

Open
mschwemer wants to merge 4 commits intopluswerk:masterfrom
mschwemer:use_postProcess_hook
Open

Use post process hook#8
mschwemer wants to merge 4 commits intopluswerk:masterfrom
mschwemer:use_postProcess_hook

Conversation

@mschwemer
Copy link

The postprocess hook is registered but not used. This commit implements the corresponding function and adds an example agent. The agent is triggered if a page is moved via DnD in the page tree. It deletes the caches of the child pages of the moved page.

This function triggers the already registered hook
"processCmdmap_postProcess" and clears the caches of the page and its
children, if it is moved within the pagetree.
If this agent is activated, the caches of all children of this page will
be cleared, when it is moved via the page tree.
This agent was developed in a project, but is moved to
EXT:cache_automation.
On high load systems this call might run into database limitations, if
the page cache of is cleared, when very many pages have to be cleared.

https://projekte.in2code.de/issues/31515
if (count($expiredPages) !== 0) {
$this->cacheService->clearPageCache(array_unique($expiredPages));
$expiredPages = array_unique($expiredPages);
// TODO: use new API in TYPO3 V9
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please no TODO comments in a pull request for master

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments