cache: use rb_strdup() instead of a static buffer for cache lines.

BUFSIZE limitation is retained as there is no need to remove it, as all lines must be smaller than it
due to RFC1459 message requirements.