We use RavenDB for our site. The site loads all its data into memory (not very much) to be able to handle massive loads. We load the data in a background-thread which regularly checks with the DB (RavenDB + sqlserver) whether any new data is present and if so loads that data into memory.
We have tried a lot of stuff to get around the annoying request limit of 30 queries into RavenDB per session. Since Raven doesn't have any mechanism to "reset" the session after we're done with one iteration of the check/load loop, and since there's no way to tell Structuremap we really want a new session even though we're still the same thread as before we're kind of stuck.
In the end I have rearchitected so that our repositories now use a RavenSessionProxy which structuremap loads for us, which can be reset by the load/fetch loop, (whichinstantiates up a new documentsession manually when we reset it).
Is this really the only way? Isn't there any mechanism within Raven to say "hey mr Session, I'm done with you for now, go flush yerself and be fresh and ready next time I call on you)" or to tell Structuremap "Hey, SM! Next time I ask you for a IDocumentSession, bring me a new one, I'm tired of this old one"