One option you might consider is using Inversion of Control / Dependency Injection to create an instance of DocumentStore as a singleton and inject it into your services via the constructor. I'm using Munq, so my example will use that, but there are lots of other IOC frameworks out there to consider.
// In your Global.asax Application_Start
// MUNQ. This will give you a RavenDB IDocumentStore as Singleton
var ioc = MunqDependencyResolver.Container;
ioc.Register<IDocumentStore>(c => InitializeRaven()).WithLifetimeManager(new ContainerLifetime());
// Initialize yourself some RavenDB
public static IDocumentStore InitializeRaven()
{
DocumentStore instance = new DocumentStore { Url = "http://localhost:8080/" };
instance.Initialize();
return instance;
}
This will get you a single instance of DocumentStore to use throughout the lifetime of your application.
Here's a Stack Overflow question that may give your some additional guidance (Autofac):
ASP.NET MVC 3, RavenDB, & Autofac Issue Plus 2 Other Autofac Questions
And an example of MSNBC using it (Ninject):
http://development.msnbc.msn.com/_news/2011/08/19/7419461-ninjectmvc3-dependency-injection-in-30-seconds-or-less?lite