[development] Object caching

Dries Buytaert dries.buytaert at gmail.com
Tue Jul 25 05:56:06 UTC 2006


On 24 Jul 2006, at 13:14, Gabor Hojtsy wrote:
>>> The path aliasing in Drupal 4.7 is better than the one in Drupal  
>>> 4.6, but that doesn't mean there is no room for further  
>>> improvements. :)
>>> Personally, I find algorithmic improvements much more interesting  
>>> than caching-based solutions.
>>
>> Other CMS's have been improving their URL alias feature by storing  
>> each alias with the data it represents. We could store node  
>> aliases in the node table, user aliases in the user table and menu  
>> aliases in the menu table.  This reduces the amount of queries we  
>> need to generate and would avoid an alias-specific caching solution.
>>
>> Of course there are other rogue aliases that couldn't be accounted  
>> for with this approach, but I bet we'd reduce the number of alias  
>> queries by 80%.
>
> The problem is with incoming aliases. How would you know, where to  
> look for, if you receive this URL:
>
>   /joeblue/testing
>
> Maybe this is a user page subtab? Maybe a node? Menu item?

Easy, we'd continue to maintain a URL alias table with all the path  
aliases.  In the node/user/taxonomy object we'd just 'cache' the  
active path alias (duplication).

(I'm not claiming this is the best solution.)

--
Dries Buytaert  ::  http://www.buytaert.net/



More information about the development mailing list