unify interface of cached and uncached to_feature

@jamesarosen