|
Nicolas Pastorino
|
Wednesday 05 January 2011 6:13:12 am
Comment64807
Hi Marko ! The brute-force approach would be to duplicate the $OperationList['publish'] operation (from kernel/content/operation_definition.php) in a custom module, and comment out the part related to cache clearing :
array( 'type' => 'method',
'name' => 'clear-object-view-cache',
'frequency' => 'once',
'method' => 'clearObjectViewCache',
'parameters' => array( array( 'name' => 'object_id',
'type' => 'integer',
'required' => true ),
array( 'name' => 'version',
'type' => 'integer',
'required' => true ) ) ),
// PreGeneration: This generates view cache for a given set of users if enabled
array( 'type' => 'method',
'name' => 'generate-object-view-cache',
'frequency' => 'once',
'method' => 'generateObjectViewCache',
'parameters' => array( array( 'name' => 'object_id',
'type' => 'integer',
'required' => true ) ) ),You can then call your module's custom 'publish' operation from PHP. I must confess i never tried this myself, so i'll be glad to hear about your experiment :) Cheers !
--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board
eZ Publish Community on twitter: http://twitter.com/ezcommunity
t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye
|