Active
Project:
Path redirect
Version:
6.x-1.0-rc1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Nov 2011 at 15:39 UTC
Updated:
22 May 2012 at 09:12 UTC
Jump to comment: Most recent file
Hi,
We just noticed the whole cache_page table is truncated when we edit a node. We don't necessarily have to save it, just opening the edit form makes us clearing the cache_page table.
This is the stacktrace:
/nl/node/102178/edit (suspended)
cache_clear_all(): /includes/cache.inc at line 133
cache_clear_all(): /includes/cache.inc at line 132
path_redirect_clear_cache(): /sites/all/modules/path_redirect/path_redirect.module at line 470
path_redirect_clear_cache(): /sites/all/modules/path_redirect/path_redirect.module at line 469
path_redirect_delete_multiple(): /sites/all/modules/path_redirect/path_redirect.module at line 507
path_redirect_delete_multiple(): /sites/all/modules/path_redirect/path_redirect.module at line 501
_pathauto_alias_exists(): /sites/all/modules/pathauto/pathauto.inc at line 28
_pathauto_alias_exists(): /sites/all/modules/pathauto/pathauto.inc at line 23
pathauto_create_alias(): /sites/all/modules/pathauto/pathauto.inc at line 334
pathauto_create_alias(): /sites/all/modules/pathauto/pathauto.inc at line 262
pathauto_form_alter(): /sites/all/modules/pathauto/pathauto.module at line 296
pathauto_form_alter(): /sites/all/modules/pathauto/pathauto.module at line 269
drupal_alter(): /includes/common.inc at line 2892
drupal_alter(): /includes/common.inc at line 2862
drupal_prepare_form(): /includes/form.inc at line 551
drupal_prepare_form(): /includes/form.inc at line 476
drupal_get_form(): /includes/form.inc at line 106
drupal_get_form(): /includes/form.inc at line 70
node_page_edit(): /modules/node/node.pages.inc at line 14
node_page_edit(): /modules/node/node.pages.inc at line 12
menu_execute_active_handler(): /includes/menu.inc at line 349
menu_execute_active_handler(): /includes/menu.inc at line 335
/index.php at line 17
Parameters passed to cache_clear_all():
$cid = null
$table = (string:10) cache_page
$wildcard = (boolean) false
Any reasons why you guys clear the whole "cache_page" just to build the edit form?
Caching mode is on "normal". Minimum lifetime = < none >
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 1341112_lazy_cache_clear.patch | 527 bytes | jsobiecki |
| #1 | 1341112.patch | 396 bytes | Jochus |
Comments
Comment #1
Jochus commentedMeanwhile, I created a patch to solve this problem. It's a not a good solution, but I can't figure out why the cache_page needs to cleared :-(
Comment #2
jsobiecki commented@Jochus
I can confirm this problem. I made some research, and this behavior is related to this issue: http://drupal.org/node/261615.
I'm not sure if pathauto_alias_exists is best place for such action (like tidy up mess in path_redirect), but it's pathauto issue, not path_redirect.
I think, that simple modification of Your change will be a bit safer approach (clean cache only when at least one entry from path_redirect was removed). Please note - this patch is against 1.0-rc2 version.
Comment #2.0
jsobiecki commented< none > replace by < none > (added spaces)