Is it possible to set the sf_cache_key in the components action? Normally it's done in the component call:
include_component('default', 'navi', array('sf_cache_key' => 'my_cache_key'));
But I need to generate it out of the "navi"-action.
Ref: contextual caching of templates with components
I solved this problem by generating the cache key in seperate filter and save it to sfConfig:
include_component('default', 'navi', array('sf_cache_key' => sfConfig::get('my_cache_key')));