Xpdo cache manager

Hello modxers, need your guidelines/help if anyone knows.

My core/cache/resources/web/resource folder is getting huge daily, all files are 61KB filezise with the below

<?php if(time() > 1616442894){return null;} return array (); i.e. there is a folder with the page id -> core/cache/resources/web/resource/123/ and inside this folder i can see more than 100 php files with just this line of code. Anyone know from where this comes from and why this happen? I can see this code inside xpdocachemanager class but i have know idea what is about. Thanks in advance. Nikos

Welcome to these forums, kar4fl3x. This is likely caused by a script on the resource with ID 123. Without knowing what is being executed on this particular resource, we have no way of knowing what precisely is creating these seemingly useless cache files.

I suspect that it’s a record of the cache expiration dates for specific resources. The cachemanager would check the file and delete the cache file file_get_contents() returns null, indicating that the cache file has expired.

The OP said it was in a folder under 1 specific resource id, though. This indicates a custom cache mechanism such as the ones used by Wayfinder, getCache, and other extras that have their own caching mechanism per resource. And why it would be returning an empty array is fairly odd.

Agreed. Maybe there’s some circumstance where the array holds something.

As paranoid as I am, my first thought was that it was an amateurish way to delay the execution of a virus or trojan to give it time to propagate before trashing the site. :wink:

Hi guys, thanks all for your informations.

Sorry for my late response. i was trying to find the problem :slight_smile:

just FYI the problem was with [[wayfinder]].

My menu was builded in 2 levels;

-> something similar to this -> https://forums.modx.com/thread/?thread=87803&page=1 and on &rowTpl=mminnerrowTPL the call inside this chunk need some improvements.

All good now and my core/cache/ folder looks happy now!!


This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.