IMemoryCache allows you to speed up your application by storing your data "in-memory". So you can reach memory from your javascript code.
Please have a look to the documentation of the IMemoryCache here: https://learn.microsoft.com/en-us/aspnet/core/performance/caching/memory?view=aspnetcore-2.1
What I would suggest you is get your cached data on backend side and put it cookie. Then later you can get cookie value from your javascript code.
I assume you have an instance of IMemoryCache which name is _cache.
You can set cache by like this.
_cache.Set(cacheKey, cacheEntry, cacheEntryOptions);
HttpCookie myCookie = new HttpCookie("yourCookieName");
myCookie["cacheData"] = cacheEntry;
myCookie.Expires = DateTime.Now.AddDays(1d);
Response.Cookies.Add(myCookie);
or you can do the same after you get your cached data. Just get the data from your memory and set it to cookie.
You can get the cookie from your Javascript by using both DOM or JQuery.
If you would like to use DOM:
var x = document.cookie;
For jquery have a look at this answer on StackOverFlow:
https://stackoverflow.com/a/1599367/1261525