Column cid in table cache_page is declared as VARCHAR(255) thus it wont fit URL's longer than 255 characters. URL's in utf8 are URL-encoded so 255 characters are not that long. A few words in utf8 in a URL could easily be longer than 255 characters. For example, http://drupal.org/สวัสดีดรูพัลด้วยภาษาไทยก็ยาวเกินแล้ว is encoded as http://drupal.org/%E0%B8%AA%E0%B8%A7%E0%B8%B1%E0%B8%AA%E0%B8%94%E0%B8%B5... totaling 342 characters.
Perhaps the attached patches could work?
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | ball.cache_page1.patch | 602 bytes | ball.in.th |
| #5 | ball.cache_page2.patch | 615 bytes | ball.in.th |
| #3 | ball.cache_page1.patch | 584 bytes | ball.in.th |
| #3 | ball.cache_page2.patch | 597 bytes | ball.in.th |
| ball.cache_page2.patch | 692 bytes | ball.in.th |
Comments
Comment #1
koyama commentedNo comments after more than 1 year? Many people must be suffering from this problem - perhaps without noticing.
Patches by ball.in.th solved the problem for a Russian Drupal site (6.16) with cyrillic URL-aliases.
Glancing at the code in Drupal 7 RC4 the problem will still persist in Drupal 7.
There may be similar problems with block caching (`cache_block` table).
Comment #3
ball.in.th commentedYes, all pages with encoded URL longer than 255 characters are not cached at all. Since there's no watchdog warning about this, I guess most people dont know about it. Column cid in table cache_page & cache_block should also be longer than 255.
Comment #5
ball.in.th commented