Here is a short bit that I wrote about how this works in a recent email:
One of the other major bsh using classes in OFBiz is OfbizBshBsfEngine. It uses the Interpreter.ParsedScript which I implemented in order to support caching parsed scripts in the OFBiz central cache. If something like that is implemented in BSH now it would be fine, but I don't think that's the case because when I sent this over to contribute it back I don't think Pat understood what we were trying to do using BSH in OFBiz so he just responded that the current facilities for doing this is all that we would need (ie using a single interpreter and wrapping all scripts in methods... that just won't work for us).
Another thing to consider is that we need to not just support caching, but caches controlled along with other caches in OFBiz. In other words the caching of parsed scripts needs to support an external cache.