The schema definitions for boost_cache.filename and boost_cache.url are varchar[255], which restricts the length of a possible URL to that length.

My scenario is that I am using a long url to encode a sequence of 20 character ids for a JSON request, where there are often 20 or so ids. This is a hot spot on my site, and I've been using an old version of boost to manage it, but in upgrading to rc5, I can no longer use the module. Which is unfortunate, as it's very useful, and I was looking forward to limiting caching to particular pages (to keep my Who's Online anonymous stats reasonably accurate).

Is there a performance need for this? Neither of these fields are indexed...

Comments

kcoop’s picture

Title: Table boost_cache fields size have restricted the length of possible URLs » Table boost_cache fields size restrict the length of possible URLs
kcoop’s picture

BTW, for anyone googling, the clue for me was seeing Duplicate entry mysql errors in my logs.

And oops, yes, I now see filename is the primary key. Maybe an md5 hash would be better?

mikeytown2’s picture

I was guessing that 255 would be enough since url_alias is limited to 128. Here's some of my thoughts on this http://drupal.org/node/453426#comment-1693852

MD5 could work... just makes everything harder. Normalizing would be a better option; if going this route... which I think I am.
http://drupal.org/node/453908#comment-2020988

kcoop’s picture

You're quick!

Normalizing sounds good. Looking forward to it.

mikeytown2’s picture

filename and url both need to go in there correct? Also need to change the crawler since that's 255 as well... do you know if you can do unique rows on text, or does it have to be varchar?

Either way 1 new table called boost_lookup

UID - unique ID
URL - Text
Filename - Text (optional)

So when url's get loaded in the crawler from the url_alias table, filename is left blank.

mikeytown2’s picture

Actually, thinking about this... keep it simple. Just add on a MD5 Column to each table; make that the unique index; convert the varchar columns to text. I'll pass the MD5 around for the future planned views expiration stuff.

mikeytown2’s picture

Version: 6.x-1.0-rc5 » 6.x-1.x-dev
Priority: Normal » Critical

next thing that needs to be done

mikeytown2’s picture

Status: Active » Needs review
StatusFileSize
new17.42 KB
mikeytown2’s picture

StatusFileSize
new17.85 KB

added 1 more update function

mikeytown2’s picture

StatusFileSize
new17.88 KB

Fixed Column count doesn't match value count on line 1499.

mikeytown2’s picture

Status: Needs review » Fixed

committed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.