We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f4c52ab commit 2c70ad8Copy full SHA for 2c70ad8
lib/internal/Magento/Framework/App/Cache/FlushCacheByTags.php
@@ -55,6 +55,24 @@ public function __construct(
55
$this->tagResolver = $tagResolver;
56
}
57
58
+ /**
59
+ * Clean cache on save object
60
+ *
61
+ * @param AbstractResource $subject
62
+ * @param \Closure $proceed
63
+ * @param AbstractModel $object
64
+ * @return AbstractResource
65
+ * @SuppressWarnings(PHPMD.UnusedFormalParameter)
66
+ */
67
+ public function aroundSave(AbstractResource $subject, \Closure $proceed, AbstractModel $object): AbstractResource
68
+ {
69
+ $result = $proceed($object);
70
+ $tags = $this->tagResolver->getTags($object);
71
+ $this->cleanCacheByTags($tags);
72
+
73
+ return $result;
74
+ }
75
76
/**
77
* Clean cache on delete object
78
*
0 commit comments