Textpattern Forum

You are not logged in. Register | Login | Help

#11 2005-05-08 15:14:11

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: [plugin] [ORPHAN] zem_cache: experiment

Note to the clueless like me: never, I repeat never delete the directory created by the zem_cache plugin in the TXP’s temp directory. If you do, nothing short of deleting the entry created by the plugin in the database will make the cache work again.

I just spend half on hour on this :(

Ok I’ve tested it on my frontpage, the whole page is cached with one instance of the cache. Without the cache, I have a generation runtime of ~0.11 (I’ve tested after a dozen of short refresh, so the MySQL4 cache was at work I believe). With the cache, I have a runtime of ~0.03.

My front page is rouglhy : one article_static, two small (~5 articles) article_custom_list, one recent_article, two call for mdn_count, and six misc_form. That output a final .html file around 20kbytes.

So for me, yes it work very much. I will go under prod’ soon, and let the cache on the frontpage for some time. If nothing wrong happen, I will start using it across the website with more granularity.

As always, nice work Zem.

Last edited by Jeremie (2005-05-08 15:30:13)

Offline

#12 2005-05-08 15:35:22

paularms
Member
From: University of Minnesota
Registered: 2004-10-21
Posts: 155
Website

Re: [plugin] [ORPHAN] zem_cache: experiment

Awesome, zem!

Though it may slow down slightly, would it be possible to rewrite this a little to have it check to the database and see when the last change was made to the content of the page and at that point rewrite the cache for the requested/changed page only? This would help to keep things a little speedy in the long run because you won’t have to flush the cache completely when you make a typo change or something of that nature.

Also, I would rather that it saved the cached files to /textpattern/cache instead of /images/cache (it just seems like a more obvious place)

Offline

#13 2005-05-08 15:48:30

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: [plugin] [ORPHAN] zem_cache: experiment

The last version (file 0.4, but the TXP plugin page say 0.3) save the cached files into the TXP’s temp dir, by default it’s textpattern/tmp/, under a hashed random name subdirectory.

Last edited by Jeremie (2005-05-08 15:48:43)

Offline

#14 2005-05-08 16:41:52

soulship
Member
From: Always Sunny Charleston
Registered: 2004-04-30
Posts: 669
Website

Re: [plugin] [ORPHAN] zem_cache: experiment

The last version (file 0.4, but the TXP plugin page say 0.3) save the cached files into the TXP’s temp dir, by default it’s textpattern/tmp/, under a hashed random name subdirectory.

Jeremy where are you seeing 0.4? The highest version in Zem’s txp directory that I see is 0.2. And its not listed on his software page anymore. I would love a copy if you have it.

Last edited by soulship (2005-05-08 16:42:02)

Offline

#15 2005-05-08 17:15:57

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: [plugin] [ORPHAN] zem_cache: experiment

On this thread ? :-)

http://thresholdstate.com/download/zem_cache-0.4.txt

Offline

#16 2005-05-08 19:23:41

soulship
Member
From: Always Sunny Charleston
Registered: 2004-04-30
Posts: 669
Website

Re: [plugin] [ORPHAN] zem_cache: experiment

Thanks!

Offline

#17 2005-05-11 17:28:55

zem
Developer emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579
Website

Re: [plugin] [ORPHAN] zem_cache: experiment

http://thresholdstate.com/download/zem_cache-0.5.txt

Fixes a stupid error that prevented flushing the cache (thanks Sencer). Also has some smarter logic for creating/re-creating the cache directory.


Alex
tstate

Offline

#18 2005-05-11 18:03:53

Romuald
Plugin Author
From: France (69)
Registered: 2005-03-01
Posts: 20
Website

Re: [plugin] [ORPHAN] zem_cache: experiment

We can update the plugin without problem ? (I have this http://thresholdstate.com/download/zem_cache-0.4.txt one)

Thanks !

Offline

#19 2005-05-12 01:10:45

Romuald
Plugin Author
From: France (69)
Registered: 2005-03-01
Posts: 20
Website

Re: [plugin] [ORPHAN] zem_cache: experiment

Zem, i have a problem with :

< txp:older>Rédactions Précédente< /txp:older>
< txp:newer>Rédactions Suivante< /txp:newer>

If the < txp:article /> is cached, it’s not working, if the cache is flushed it works.

Can see it here : http://ckkoshi.free.fr/
The cache id for my < txp:article /> is id=“05”

Is it resolvable ? I understand the problem and it seems to be complicated.

Offline

#20 2005-05-12 09:41:47

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: [plugin] [ORPHAN] zem_cache: experiment

A small glitch to mention… if you cache the begining of a page, IE/Win would go back to quirks render mode. The plugin add a HTML comment, and in our case before the DTD, and IE/Win don’t like this at all.

So if you rely on IE standard compliance mode (well, the IE kind anyway), don’t cache the DTD.

Offline

Board footer

Powered by FluxBB