can eZ Publish use eZ Component's memcache

Author Message

Marko Žmak

Monday 14 June 2010 12:38:35 am

I see that eZ Components have a nice support for memcache:

http://ezcomponents.org/docs/api/latest/introduction_Cache.html#memory-caching

So can eZP be configured so that uses this memcache feature? What can be cached in this way? What has to be done in order to achieve this?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Edi Modrić

Monday 14 June 2010 1:32:34 am

Don't know about eZC memcache component, but there's an extension that allows the use of memcache for file locking operations, overriding eZMutex class.

http://projects.ez.no/ngmemcachemutex

eZ Publish certified developer

http://ez.no/certification/verify/350658

André R.

Monday 14 June 2010 1:39:25 am

You'll have to rewrite the eZ Publish cache layers (and optimally change them to use one api that uses ezcCache as back end), please send patch :)

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Marko Žmak

Monday 14 June 2010 2:52:52 am

Ok, further questions:

- can the eZ Component's memcache functionality be used to cache the query results from the database?

- what about lamemcache (http://projects.ez.no/lamemcache)? What kind of caching does it provide? (besides managing sessions)

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Marko Žmak

Thursday 08 July 2010 3:04:39 pm

Andre, I'm thinking of rewriting the cache layers, could you give me some hints about it...

What cache classes would be best to rewrite?

Is there a single class that I can rewrite which would make memcache work with all caches?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Gaetano Giunta

Friday 09 July 2010 2:06:37 am

Look at the cluster file handlers, the real meat is in there

Principal Consultant International Business
Member of the Community Project Board

Marko Žmak

Friday 09 July 2010 3:32:50 am

"

Look at the cluster file handlers, the real meat is in there

"

And what about adding a new file handler that uses memcache? How does that sound?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Bertrand Dunogier

Friday 09 July 2010 5:32:43 am

I had tried that. The issue is that memcache is not, by design, a persistent/reliable storage backend. It is volatile, and can't really be trusted for persistent data.

Besides that, there is no reason why it wouldn't work.

Bertrand Dunogier
eZ Systems Engineering, Lyon
http://twitter.com/bdunogier
http://gplus.to/BertrandDunogier

Marko Žmak

Friday 09 July 2010 6:16:38 am

Yes I see that file handlers don't handle only cache files but also other, persistent files. So I'm back to the previous question:

Is there a single class that I can rewrite which would make memcache work with all caches?

(but which works only with caching not for other files)

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

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 01:57:33
Script start
Timing: Jan 18 2025 01:57:33
Module start 'layout'
Timing: Jan 18 2025 01:57:33
Module start 'content'
Timing: Jan 18 2025 01:57:34
Module end 'content'
Timing: Jan 18 2025 01:57:34
Script end

Main resources:

Total runtime0.9697 sec
Peak memory usage4,096.0000 KB
Database Queries81

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0069 589.7266153.4688
Module start 'layout' 0.00690.0034 743.195339.4219
Module start 'content' 0.01030.9580 782.6172749.0703
Module end 'content' 0.96830.0014 1,531.687520.1250
Script end 0.9697  1,551.8125 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.3402160.0002
Check MTime0.00140.1406160.0001
Mysql Total
Database connection0.00070.068610.0007
Mysqli_queries0.886791.4415810.0109
Looping result0.00090.0894790.0000
Template Total0.936096.520.4680
Template load0.00210.221620.0011
Template processing0.933896.298820.4669
Template load and register function0.00010.008710.0001
states
state_id_array0.00080.080610.0008
state_identifier_array0.00080.079420.0004
Override
Cache load0.00190.1968420.0000
Sytem overhead
Fetch class attribute can translate value0.00070.074450.0001
Fetch class attribute name0.00130.1372140.0001
XML
Image XML parsing0.00270.273850.0005
class_abstraction
Instantiating content class attribute0.00000.0040180.0000
General
dbfile0.00200.2101430.0000
String conversion0.00000.001040.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
9content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
9content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/quote.tpldatatype/ezxmltext/quote.tplextension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/quote.tplEdit templateOverride template
1content/datatype/view/ezxmltags/emphasize.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/emphasize.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 32
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs