genericize object cache