I have the following PLV8 stored procedure that defines a function that does a lookup on some key/values - and caches the lookup table as a Map in memory:
cre