updated caching mechanics

cache now supports hard references in addition to soft references