Quote from: manu37 at Sep 06, 2013, 03:40 AMThis will simply delete the cache file for that resource.
Which resource? I have to render every Resource's TV to select my plugin condition. As I see this, this would end up with every page uncached.
Sorry, I thought your plugin was only operating on the current resource, which would be available with $modx->resource in the front end. I was thinking that the resource would already have been loaded from the cache, but you're right, it would then become uncached for the next visit.
Here is something else to try. It's hacking the core code, but I think it might work.
In this code in the core\model\modx\modtemplatevar.class.php file:
$resource = $this->xpdo->getObject('modTemplateVarResource',array(
'tmplvarid' => $this->get('id'),
'contentid' => $resourceId,
),true);
Change that final true to false. That *should* get the TVR from the DB instead of the cache.
If that works, maybe $tv->getValue() and $tv->RenderOutput() should have a $cacheFlag argument added.