add CachedTable and tests