Added source dict caching

Added a cache for source dicts.

If a source dict is present, the update_source_dict function short circuits a success. If not it is added and continues as normal.