Cache improvements

Objects which use pseudo class function are not being put into cache.