Using a session tightly couple your implementation to a detail that is not stateless (thus not restful) at all.
What I would do is to use a library which is created for this specific purpose, like CacheManager.
It will help you implementing an abstract cache which may be backed by RuntimeCaching
if you plan to execute your application in a single instance, and switch any time to a distributed approach (e.g. Redis) whenever you need it.
Register inside your Dependency Injection framework something like (pseudocode):
container.RegisterSingleton<ICache<MyObject>>(() =>
CacheFactory.Build<MyObject>(settings => settings.WithSystemRuntimeCacheHandle()));
And then inject it inside your controller:
public class MyController : ApiController
{
private readonly ICache<MyObject> _cache;
public MyController(ICache<MyObject> cache)
{
_cache = cache;
}
public IHttpActionResult GetCached()
{
var myObj = _cache.Get("myKey");
if(myObj == null)
{
myObj = GetObjectFromWhereverYouWant();
_cache.Put(myObj, "myKey");
}
return Ok(myObj);
}
More examples are found inside the documentation.