Skip to content

Instantly share code, notes, and snippets.

@colepacak
Created February 5, 2018 18:06
Show Gist options
  • Save colepacak/64871607b503c8cc64e82e2a1eb83af3 to your computer and use it in GitHub Desktop.
Save colepacak/64871607b503c8cc64e82e2a1eb83af3 to your computer and use it in GitHub Desktop.
diff --git a/src/XmlSitemapWriter.php b/src/XmlSitemapWriter.php
index 6497da2..0839817 100644
--- a/src/XmlSitemapWriter.php
+++ b/src/XmlSitemapWriter.php
@@ -156,6 +156,7 @@ class XmlSitemapWriter extends \XMLWriter {
* @codingStandardsIgnoreStart
*/
public function generateXML() {
+ \Drupal::entityTypeManager()->getStorage('xmlsitemap')->resetCache();
// @codingStandardsIgnoreEnd
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