Added a way to cache script values using reference_once, but automatically updates them when needed.