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 |
Jump to:
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
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
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.jpgmap_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
Hot damn! We have a clue. Thanks m3avrck.
#4
Hot damn! We have a clue. Thanks m3avrck.
#5
Wow... looking at the cache_path table is like an archeological expedition into attempted XSS attacks.
#6
Indeed, I hope to look into this soon again, if anyone beats me to it please let me know ;)
#7
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
Any news? Could this patch be used or is it not recommended by now?
#9
^ What he said - my DB is about to "dump core", so to speak.