-
Notifications
You must be signed in to change notification settings - Fork 67
Open
Description
Support for creatuity/magento2-interceptors
has initially been added in #108 / 8028a16. Sometimes, we still need to manually remove generated/staticcache
, so that plugin changes are being applied. I'll have a look into this in more detail, but first, I have a question about this code:
magento-cache-clean/src/magento/watcher.cljs
Lines 193 to 212 in 5ccca09
(defn- rm-creatuity-cache-area [area] | |
(let [cache-file-name (str "generated/staticcache/global_primary_" area "_compiled_plugins.php")] | |
(run! (fn [base-dir] | |
(let [cache-file (str base-dir cache-file-name)] | |
(when (fs/exists? cache-file) | |
(do | |
(log/notice "Removing creatuity interceptor cache file" cache-file) | |
(fs/rm cache-file))))) (mage/all-base-dirs)))) | |
(defn- rm-creatuity-cache [] | |
(run! #(let [cache-dir (str % "generated/staticcache/")] | |
(when (fs/dir? cache-dir) | |
(do | |
(log/notice "Removing creatuity interceptors cache" cache-dir) | |
(fs/rm-contents cache-dir)))) (mage/all-base-dirs))) | |
(defn- clean-creatuity-interceptor-cache [file] | |
(if-let [area (di-xml-area file)] | |
(rm-creatuity-cache-area area) | |
(rm-creatuity-cache))) |
I don't know ClojureScript, but to me, it looks like it does two things:
rm-creatuity-cache-area
: Remove the area-specific compiled plugin file"generated/staticcache/global_primary_" area "_compiled_plugins.php"
.rm-creatuity-cache
: Remove everything inside"generated/staticcache/"
.
But if we do 2, 1 is not needed at all, right? Am I missing something? 🤔
Metadata
Metadata
Assignees
Labels
No labels