Thank you Gaetano. I'm sorry it's still not working, I'm not getting shown the new content on the site, not when I use the API to refresh the cache and not when I do that manually.
The odd thing is that it does work, but only for one single site out of 15 I've been testing this on. That one is the one I originally programmed it for. Have been searching for anything that would make it specific to that site, but the script seems to be general.
If it's of any help, I'm posting my source code below I'm using to try and refresh the frontpage content.
I'm a bit at a loss trying to understand your code, sorry. Otoh I thing you might not be trying to do it the right way - either that or I have not understood your needs...
If the use case is
- article is part of a frontpage as element in a block
- article title is changed via API - frontpage does not refresh when article is updated
then in your code you will have to expire the cache of the frontpage node, not the cache of the article, as you seem to be doing
Principal Consultant International Business
Member of the Community Project Board