i patched forum.module only and thought working fine
but today, i looked at cache tables and recognize that cache_forum table truncates periodically(5 minutes maybe).

is there any setting for cache lifetime?

Comments

firebus’s picture

look through the code for this:

cache_clear_all('*', 'cache_forum', TRUE);

that will show you all the instances in which forum is cleared.

currently the forum cache is cleared whenever any modification is made to any
-term
-node
-comment

do you get a new/updated/deleted node or comment every 5 minutes?

the forum cache works great but is far from optimal. i've got a major rework of the forum cache in the works that will respect modules that rewrite taxonomy queries and will be a little more persistent.

11’s picture

yes, gets comment in that time

but i thougt the forum_cache patch provides caching the forum structure only,
everything else is node and should be node_cache's work anyway

firebus’s picture

the cached forum object includes things like number of comments on a node, most recent comment on a node, etc. for forum nodes. that data is out of date when a new comment is added to a forum node.

with the current implementation there's room for improvement by, say, testing the node to see if it's type==forum before clearing the cache.

the next implementation will have a more granular cache so that we don't have to expire the entire cache on each new node or comment.

robertDouglass’s picture

I'm hoping for followup here.

firebus’s picture

Assigned: Unassigned » firebus
Status: Active » Fixed

fixing this, since the current behavior is by design.

will open a new issue with my forum caching implementation...

firebus’s picture

there already is a new issue with my forum caching implementation!

i just need to fix table sort...

http://drupal.org/node/188005

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.