changed the caching thing to store a cache object, and then have the
cache object store the variables. base tpe is dict-like