When path_set_alias is called without any arguments except the path i.e. path_set_alias('node/'. $node->nid);
then it causes the path cache to be reset via drupal_clear_path_cache(). This occurs when the alias is being deleted from the url_alias table even when no records are actually removed.
This is a performance issue because drupal_clear_path_cache calls drupal_lookup_path() with an action of 'wipe', when used in conjunction with the pathcache module this results in an unnecessary cache clear of the cache_pathdst and cache_pathsrc cache tables. As an additional performance hit, when using a memcached caching backend this results in memcache_variable_set("cache_flush_$table", time());
being called, and the entire variables cache being rebuilt.
Comment | File | Size | Author |
---|---|---|---|
#4 | 1863834-4-path_alias_delete_cache.patch | 500 bytes | tsphethean |
#1 | 1863834-1-path_alias_delete_cache.patch | 451 bytes | tsphethean |
Comments
Comment #1
tsphethean CreditAttribution: tsphethean commentedComment #2
tsphethean CreditAttribution: tsphethean commentedComment #4
tsphethean CreditAttribution: tsphethean commentedOops, lazy patch first time round. Proper patch this time.