Modx 2.8.4 caching snippet results and ignoring all changes made

Using Modx 2.8.4, I keep having trouble with a snippet which seems to be cached somewehere. This is how I included it into my page template (for which I also disabled caching):

[[!apicalls? &query=[[!]]]]

The snippet itself used to execute a curl request. For about 2 hours now, Modx seems to refuse applying the latest changes I’ve made. I shrunk the entire snippet down to a simple return "foo"; instruction but the page keeps showing the previous API call results from the snippet.

At the same time, I am getting a HUGE amount of errors in the error log, where Modx complains that it can’t find the snippet named after the returning data from my previous API call responses (which makes no sense to me at all):

Could not find snippet with name \xrf/url. (<- which is the content from previous CURL API calls)
[... thousands of error lines like this ...]

Maybe it is worth mentioning that I queried big amounts of data with my snippet (up to 10MBs). I use Formit as well as FormItRetriever for handling the search form data.

This is what I’ve tried:

  • I logged out of Modx

  • restarted the PC and cleared the browser cache

  • manually deleted the core/cache directory

  • disabled caching for all page templates

What am I missing?

The snippet codes are cached in the folder core/cache/includes/elements/modsnippet. The name of the file is the ID of the snippet plus .include.cache.php (for example 12.include.cache.php).
Is the code in that cache file the correct one?

Is the snippet code in the database the correct one? (Database table modx_site_snippets column snippet.)

The core/cache/includes folder is empty (probably because I disabled caching it and manually wiped all data as mentioned earlier).

The snippet code in the database is correct.

And now out of nowhere (I left the website untouched for about an hour or so for writing this post) the browser shows an up to date version. Very strange and frustrating since I would like to know the origin of this problem. Is there another cache on webserver level which could have caused the problem or anything else?

I had a similar problem a couple of weeks back - it turned out to be OpCache in CPanel that was causing it.

I disabled it in PHP Extensions.

I’m not sure if my hosting partner enabled it in the background or what because it happened across many of my CPanel accounts at the same time - but that was the source of the problem.

Worth a look anyway.

Try using Chrome with the extension: Classic Cache Killer. Enable CCK by clicking on its icon at the upper right. That will tell you if it’s a problem with the browser cache.

Thanks for your effort, guys. I will keep my eyes open, hoping not to face this issue again some time soon.