Hello,
I've noticed that almost each time I am opening a page, I am getting requiest to DB no mater if pathcache patch was added. Then I've looked into patched code and noticed following:
+ cache_set($cid, $alias, 'cache_pathdst', variable_get('pathcache_expire', 43200)); // 12 hours
If I understand correctly, this should be like this:
+ cache_set($cid, $alias, 'cache_pathdst', time() + variable_get('pathcache_expire', 43200)); // 12 hours
Atleast, it helped me to stop "forgetting" cached value. Same about cache_set for "cache_pathsrc" bin.
Any comments?
Comments
Comment #1
neclimdulBeen watching this myself and trying to sort it out. I'm surprised that changed anything because the http://us3.php.net/manual/en/function.memcache-set.php">memcache docs specifically say that it accepts a timestamp under 30 days as a valid expiry time. Which is why I hadn't even considered trying that as a fix. Also about 60% of my paths seemed to be getting cached which still doesn't make any sense.
Anyways... here's an actual patch that contains an additional(documented) fix that avoids queries for paths that don't have entries(node; admin/*; views paths; etc). More than happy to split that out but it was easier to include it.
Comment #2
neclimdulStats on one of our sites pathsrc bin show a change from ~0.75% hit percentage to ~95% hit percentage. pathdst hasn't show much of a change though. Not sure why. Think this is definitely a solid patch.
Comment #3
jvandyk commented