Very bad hit ratio for path caching

robertDouglass - February 12, 2008 - 22:19
Project:Advanced cache
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

The path caching patch needs to be fundamentally checked for accuracy. I'm getting very bad hit ratios on my site for it (I see this by looking at the memcache stats... normal Drupal caching doesn't give any feedback as to its effectiveness).

#1

firebus - February 13, 2008 - 00:22

i confirm a bad ratio on my site...

a quick look at code makes it look like the cache is cleared whenever a path is added/modified/deleted - so that shouldn't be a problem unless pathauto or something similar is installed.

on two consecutive loads of a page i get a hit, so it's not completely broken.

could something like 404 errors be padding the miss count?

#2

m3avrck - February 19, 2008 - 21:26

Indeed, I checked it out and I realized I had all of these...

no_src_http://localhost.mothersclick.com:8888/files/imagecache/group_logo_thumb/files/group_logos/30something.jpg
map_http://localhost.mothersclick.com:8888/files/imagecache/group_logo_thumb/files/group_logos/20266_mid_t2.jpg

Because imagecache uses Drupal 404s to generate resized images, somewhere this patch is caching this --- filling up the path cache *significantly* with junk.

Fixing the patch to remove this would help quite a bit with the hit ratio and I think we can further improve it.

#3

robertDouglass - February 20, 2008 - 08:06

Hot damn! We have a clue. Thanks m3avrck.

#4

robertDouglass - February 20, 2008 - 08:06

Hot damn! We have a clue. Thanks m3avrck.

#5

robertDouglass - February 20, 2008 - 08:17

Wow... looking at the cache_path table is like an archeological expedition into attempted XSS attacks.

#6

m3avrck - March 7, 2008 - 21:50

Indeed, I hope to look into this soon again, if anyone beats me to it please let me know ;)

#7

m3avrck - March 21, 2008 - 22:50

Not only that, but when a piece of content is created, it selects *all* aliases for menu items, up to 700+ queries running adding a node or comment. Why isn't the aliasing working in this case????

#8

funana - April 13, 2008 - 23:47

Any news? Could this patch be used or is it not recommended by now?

#9

NikLP - April 24, 2008 - 16:44

^ What he said - my DB is about to "dump core", so to speak.

 
 

Drupal is a registered trademark of Dries Buytaert.