As seen in the tests cache router doesn't handle wildcard cleaning up the right way (http://drupal.org/node/279146).
Tests failing:
* Two caches removed after clearing cid "*" with wildcard true.
* Two caches removed after clearing cid substring with wildcard true

This is checked with the DB engine, the other engines still need to be tested for wildcard functionality!

CommentFileSizeAuthor
wildcard_fix.patch6.57 KBR.Muilwijk

Comments

andypost’s picture

hey there! there's a lot of discussions about wildcards and today only lookup keys realized but it's bottleneck...

andypost’s picture

Status: Needs review » Needs work

The architecture of this module is cacherouter.inc process $wildcard in cache_clear_all and then adds '*' at the end of $cid then call delete which examines '*' at the and and use it as wildcard-flag. So no need in additional params.

R.Muilwijk’s picture

@andypost... just but it doesn't work and it only gives you processor cycles for doing substr's and strposses every time.

andypost’s picture

@R.Muilwijk agree but the problem #1 is locking of lookup table which brings a lot of cpu utilization except eacc and db modules which provide 'native' locks. I work a lot on caching on drupal.ru site and my solution is store every cahe-* table in different nonshared-memcache instance so no overhead on flush.

R.Muilwijk’s picture

@andypost, How would you implement this for APC? Besides working 'correctly' is more important then some more performance gain. If you know a other solution for APC please try to show some code

andypost’s picture

Suppose better to use flock when locking lookup record but it needs a new config option - temp_dir or file_to_lock
I'm open for discussions because not only apc->lock holds this bottleneck.

nathan.zhu’s picture

Now there have a new problem about wildcard

$cid = 'node:'. $nid;
cache_clear_all($cid, 'cache', TRUE);

so there don't input the "*", some module do this. can you fix it?

andypost’s picture

@snowwind - where are you find this?

murz’s picture

Subscribe

nathan.zhu’s picture

I just see the memcache module have this problem, some module use that way. to many modules in there, i'm not looking forward it happened, just worry about it, so what do you think about this bug?

slantview’s picture

Status: Needs work » Closed (fixed)