adds a poor mans tmp db cache
sets up a lazy cache clearing
corrects the action to be on update