Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions Classes/Cache/Listener/SolrIndexingProcessListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,16 @@

namespace SFC\Staticfilecache\Cache\Listener;

use SFC\Staticfilecache\Event\CacheRuleFallbackEvent;
use SFC\Staticfilecache\Event\CacheRuleEventInterface;

/**
* Solr Indexing process.
*/
class SolrIndexingProcessListener
{
public function __invoke(CacheRuleFallbackEvent $event): void
public function __invoke(CacheRuleEventInterface $event): void
{
// Note!! This is handled by old EXT:solr versions!!!
// The new version set the 'frontend.cache.instruction' in the
// right way and is cached via CachingAllowedListener.

if ($event->getRequest()->hasHeader('X-Tx-Solr-Iq')) {
if ($event->getRequest()->getAttribute('solr.indexingInstructions', null) !== null) {
$event->addExplanation(__CLASS__, 'Solr Indexing request');
$event->setSkipProcessing(true);
}
Expand Down
3 changes: 3 additions & 0 deletions Configuration/Services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ services:
- name: event.listener
identifier: 'SolrIndexingProcessListenerFallback'
event: SFC\Staticfilecache\Event\CacheRuleFallbackEvent
- name: event.listener
identifier: 'SolrIndexingProcessListener'
event: SFC\Staticfilecache\Event\CacheRuleEvent

SFC\Staticfilecache\Cache\Listener\T3CrawlerIndexingProcessListener:
tags:
Expand Down