When I've disabled the CacheMaster and clear manually cache, the problem still remains. So it seams it is not related to CacheMaster plugin.
Can You advice me how to fix it?
I think you'll have to wait for the next update of MODX unless you can find the problem yourself in the MODX code.
Thanks Bob,
Right now I've noticed that on other small website powered by Revo 2.3.3 and nearly no snippets, and plugin installed, the problem doesn't appear.
Do You know if there is any debugging tool that will let me know which plugin or snipped force clear cache on doc save?
I'm attaching the list of active plugins, might by You will have an idea of which plugin does it.
I don't know of a debugging tool for that, but you can try disabling plugins and see if it stops. I'd probably manually delete everything in the core/cache directory after each change before testing.
It's most likely a plugin that's connected to OnDocFormSave or OnBeforeDocFormSave. You can check on the events tab of each plugin to see what they're connected to.
These look like possible candidates: Babel, Virtual Aliases, MinifyX, Quip Resource Cleaner
You could search the plugin code for the words cache or refresh, though if they load a class file with include or require, you'd have to search that class file too.
Very good idea. I've disabled plugins you suggested on by one and finally found one that was causing it - it was Babel.
I think that this is strange behavior and reported it to the author of that plugin.
Thank You for your support and the CacheMaster plugin that will hopefully help me managing cache in more efficient way.
Babel would have been my first guess. I'm glad you found it.
What events is the Babel plugin connected to?
This line in the babel class file is almost certainly the culprit:
$this->modx->cacheManager->refresh();
You could comment it out if you don't mind some content in other languages potentially being out of date.
I'm glad you got it sorted. Thanks for the report.
I'm sure it will help others.