Sunday 16 November 2008 2:09:10 pm
At the point of the development it would be more difficult to pass the add to bookmars stuff than adding a cache_ttl to 0 for example.
I prefer not considering javascript option because accesibility (WAI) reasons. Also, working with cache-blocks in this template, will me make to set a node_id as a expiry key... and i've told to use cache-blocks expiry keys as unique as possible. lot of cache-blocks could overhead the system. My idea is to fetch node and get this class, so i was thinking about adding some code in kernel/content/view.php. Getting your code from the svn at revision 25222, it would be something like
$viewCacheSettings = $ini->variable( 'ContentSettings', 'ViewCacheSettings' );
if ( isset( $viewCacheSettings[$NodeID] ) )
{
$viewCacheSetting = $viewCacheSettings[$NodeID];
if ( $viewCacheSetting === 'disabled' )
{
$viewCacheEnabled = false;
}
}
else
{
$viewCacheSettingsClass = $ini->variable( 'ContentSettings', 'ViewCacheSettingsClass' );
$node = eZContentObjectTreeNode::fetch($NodeID);
if ( isset( $viewCacheSettingsClass[$node->classIdentifier()] ) )
{
$viewCacheSetting = $viewCacheSettingsClass[$node->classIdentifier()];
if ( $viewCacheSetting === 'disabled' )
{
$viewCacheEnabled = false;
}
}
}
and i would add another config variable in site.ini. My site.ini.append.php would probably looks like
[ContentSettings]
ViewCacheSettingsClass[article]=pr_user
Works in my tests, but i also think this is a "hack" to kernel/content/view.php that i would prefer not having to do :).
|