made cache slightly more sophisticated. per-script cache can no longer hold more than 50 items. (totally made that number up >_> we'll see how it performs...)