Cache results of linkStringToArray

Might be beneficial for sites with large number of links (with same link in different menus) at the expense of memory usage.

Closes #350

Do you think the memory cost is worth it?