Created
February 6, 2018 22:12
-
-
Save colepacak/64082e54d54c10ee0a93c19ce721d02a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/XmlSitemapWriter.php b/src/XmlSitemapWriter.php | |
index 6497da2..8f22722 100644 | |
--- a/src/XmlSitemapWriter.php | |
+++ b/src/XmlSitemapWriter.php | |
@@ -157,6 +157,8 @@ class XmlSitemapWriter extends \XMLWriter { | |
*/ | |
public function generateXML() { | |
// @codingStandardsIgnoreEnd | |
+ // Clear out the node static cache once the chunk has finished. | |
+ \Drupal::entityTypeManager()->getStorage('node')->resetCache(); | |
return \Drupal::service('xmlsitemap_generator')->generateChunk($this->sitemap, $this, $this->sitemap_page); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment