more option on content view cache

Author Message

decan olivier

Thursday 17 April 2008 7:33:49 am

Hello ,

I was just wondering if it was possible to disable content view cache by role (not the caching of role).
Some website don't need to have différent view cache based on role and it can be a great load reducing to check only the cache for anonymous.

For personnalisation, i just add some ajax and cache-block which is quite better (for performance) than several content cache.

I add a little hack for having this functionnality in kernel/content/view.php

if ( $viewCacheEnabled )
{
    $cacheExpired = false;
    //$user =& eZUser::currentUser();

    // hack kernel //
    //forcing check of anonymous caching..
    $user= & eZUser :: instance( "10");
   // end hack kernel //

$cacheFileArray = eZNodeviewfunctions::generateViewCacheFile( $user, $NodeID, $Offset, $layout, $LanguageCode, $ViewMode, $viewParameters );
 

My ezpublish website: http://www.zenaba.com

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 04:23:02
Script start
Timing: Jan 18 2025 04:23:02
Module start 'layout'
Timing: Jan 18 2025 04:23:02
Module start 'content'
Timing: Jan 18 2025 04:23:04
Module end 'content'
Timing: Jan 18 2025 04:23:04
Script end

Main resources:

Total runtime1.4483 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0063 589.0547152.6250
Module start 'layout' 0.00630.0027 741.679739.4453
Module start 'content' 0.00901.4379 781.1250469.9844
Module end 'content' 1.44690.0013 1,251.10948.1563
Script end 1.4483  1,259.2656 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.2507160.0002
Check MTime0.00140.0974160.0001
Mysql Total
Database connection0.00100.071710.0010
Mysqli_queries1.408497.2419460.0306
Looping result0.00050.0350440.0000
Template Total1.407597.220.7038
Template load0.00250.170320.0012
Template processing1.405197.013720.7025
Template load and register function0.00010.007410.0001
states
state_id_array0.00180.121510.0018
state_identifier_array0.00220.150020.0011
Override
Cache load0.00210.1416100.0002
Sytem overhead
Fetch class attribute can translate value0.00070.050010.0007
Fetch class attribute name0.00070.046320.0003
XML
Image XML parsing0.00060.039710.0006
class_abstraction
Instantiating content class attribute0.00000.000220.0000
General
dbfile0.00080.0521160.0000
String conversion0.00000.000740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 8
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs