-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OnDocFormSave Plugin to clear partition #5
Comments
Hi Exside, Did you ever make this work? I tried with the following code, it didn't give me exceptions but also the cache was not cleared afterwards..
I used a second array for the processors_path because in the documentation, it says so (https://rtfm.modx.com/revolution/2.x/developing-in-modx/advanced-development/using-runprocessor#UsingrunProcessor-UsingrunProcessor) "This directory can also be overridden in the 3rd parameter array with the param 'processors_path'" @opengeek, maybe any Inputs from your side? Best regards |
@janwidmer: The processors path should point to the processors folder and the action needs no .class suffix:
|
Above plugin works OnSiteRefresh, but somehow for me not OnCacheUpdate.. And is there a way to keep the original output of the Clear Cache process visible in the console? |
First of all thank you very much for that nice snippet, helps a lot!
What I'm trying to do (according to the wiki here on github) is to clear a specific cache partition (set by getCache) with a plugin that is attached to the system event OnDocFormSave, but it seems that I'm just too stupid to get it right^^...never worked with processors before, so maybe that's the reason, but the RTFM about runProcessor didn't really help...I think it's something with passing the right path to the method, but I couldn't figure it out...what I tried was:
but what I get is just an endless saving loop =/, any tipps on that, would maybe also be helpful for others to include it more precisely into the wiki.
thanks in advance for any advice!
The text was updated successfully, but these errors were encountered: