File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<?php
2+
23namespace Flowpack \FullPageCache \Aspects ;
34
45use Neos \Cache \Frontend \StringFrontend ;
@@ -35,6 +36,24 @@ public function grabUncachedSegment(JoinPointInterface $joinPoint)
3536 $ this ->hadUncachedSegments = true ;
3637 }
3738
39+ /**
40+ * This aspect is for Neos 8.x compatibility and can be removed, when Neos 8.x isn't supported anymore.
41+ * See: ContentCacheAspect::interceptNodeCacheFlush() for Neos 9.x cache flushing
42+ *
43+ * @Flow\Before("method(Neos\Neos\Fusion\Cache\ContentCacheFlusher->commit())")
44+ * @param JoinPointInterface $joinPoint
45+ *
46+ * @throws \Neos\Utility\Exception\PropertyNotAccessibleException
47+ */
48+ public function interceptLegacyNodeCacheFlush (JoinPointInterface $ joinPoint )
49+ {
50+ $ object = $ joinPoint ->getProxy ();
51+
52+ $ tags = ObjectAccess::getProperty ($ object , 'tagsToFlush ' , true );
53+ $ tags = array_map ([$ this , 'sanitizeTag ' ], array_keys ($ tags ));
54+ $ this ->cacheFrontend ->flushByTags ($ tags );
55+ }
56+
3857 /**
3958 * @Flow\Before("method(Neos\Neos\Fusion\Cache\ContentCacheFlusher->flushTagsImmediately())")
4059 * @param JoinPointInterface $joinPoint
You can’t perform that action at this time.
0 commit comments