Is there a way to access a cache or session from a static method?
System.Web.HttpContext.Current.Cache
Cache is shared per app domain - not per Page. Page just has a convenience property of Page.Cache to get the current Cache, which means you can just do Cache["key"] from a method in a page.
As you've noticed, if you're in a static method - then you have no Page instance, and you have no Page.Cache property. So, you need to use HttpContext.Cache. But, wait - you have no HttpContext instance either! That's ok, the currently executing instance is stored at the static property of HttpContext.Current.
So - to answer your question - in a static method, use HttpContext.Current.Cache. BTW, you can also access the Request and Response properties from there.
Javascript is client side, the Cache is on the Server Side, so you need to do a callback to a method in your asp.net application, that returns the content of the cache.
The ASP.NET Cache API is really good, you can use Cache["Key"] to get the cached content that you like. Read more here : http://msdn.microsoft.com/en-us/library/ms972379.aspx