Ray: Remembers previous call

Minor optimization: return previous result immediately if called with
the same `t` parameter as last time.