Hi!
I am new to this forum and I hope that I’ve posted in the right category...
I have a site in modx which displays news from different RSS sources. More exactely there is a PHP file in a folder on the same level with assets, manager etc. which is repeated with a cronjob. The PHP script reads news and puts them in the database, in modx_site_content
As you can imagine, the newly created alias type of links for the latest news are not working, because the aliases are not listed in the cache idx file!
How can I clear the cache from my PHP, after insterting elements into the database?
I saw the way modx does this from inside, the same thing happens with NewsPublisher etc. but how can I do this thing from PHP files?
Also note that I am a beginner in PHP
As I sad, my PHP file is in a folder located on the same level with manager and assets, therefore the code that I’ve tried is this:
include_once "../manager/processors/cache_sync.class.processor.php";
$sync = new synccache();
$sync->setCachepath("../assets/cache/");
$sync->setReport(false);
$sync->emptyCache();
But nothing happens! >:(
Can someone help me on this one?
Thank you!