Hi Peter,
If you are just worried about DB hits then you might want to just use the -cache switch on the db APIs. The current db API I think has been modified by DonB to accept this switch. This way your code stays the same and just add that -cache to db_multirow, db_string, etc.