RavenDB as an alternative to memcache?

206 views
Skip to first unread message

monsters

unread,
May 16, 2012, 10:54:24 AM5/16/12
to rav...@googlegroups.com
I'm currently running both (actually couchDB as a memcache replacement)

Seems to me that ravenDB in RAM mode, might do the same... is there a way to run 1 database in 'normal' mode, and another in 'ram' mode?

Oren Eini (Ayende Rahien)

unread,
May 16, 2012, 10:57:30 AM5/16/12
to rav...@googlegroups.com
You can _do_ that ,sure.
But I am not sure what you are trying to get at. RavenDB is a persistent ACID database. Memcached is a cache.
Totally different things and optimization scenarios.

monsters

unread,
May 16, 2012, 11:02:19 AM5/16/12
to rav...@googlegroups.com
Mostly just looking to see if i could do it and simplify my server environment. pretty sure this is essentially what couchbase is doing currently.


On Wednesday, 16 May 2012 10:57:30 UTC-4, Oren Eini wrote:
You can _do_ that ,sure.
But I am not sure what you are trying to get at. RavenDB is a persistent ACID database. Memcached is a cache.
Totally different things and optimization scenarios.

On Wed, May 16, 2012 at 3:54 PM
I'm currently running both (actually couchDB as a memcache replacement)

Itamar Syn-Hershko

unread,
May 16, 2012, 11:54:01 AM5/16/12
to rav...@googlegroups.com
RavenDB has several levels of cache built in - is there anything pushing you to start adding more layers?

Chris Marisic

unread,
May 16, 2012, 12:03:43 PM5/16/12
to rav...@googlegroups.com
Make sure to look into the aggressively cache part too

monsters

unread,
May 16, 2012, 3:53:00 PM5/16/12
to rav...@googlegroups.com
So would anyone here suggest it wouldn't do the job as well as memcache?

Itamar Syn-Hershko

unread,
May 16, 2012, 3:57:46 PM5/16/12
to rav...@googlegroups.com
Question is, what job? caching is not what RavenDB is for, but if you use RavenDB you already enjoy lots and lots of caching, so question is why would you want to install another layer?

Sean Kearon

unread,
May 16, 2012, 4:04:34 PM5/16/12
to rav...@googlegroups.com
Make sure to look into the aggressively cache part too

Any relevant links for this, Chris? 

Itamar Syn-Hershko

unread,
May 16, 2012, 4:06:03 PM5/16/12
to rav...@googlegroups.com

Sean Kearon

unread,
May 16, 2012, 5:00:15 PM5/16/12
to rav...@googlegroups.com
Thanks Itamar.

On Wednesday, 16 May 2012 21:06:03 UTC+1, Itamar Syn-Hershko wrote:

monsters

unread,
May 16, 2012, 5:21:16 PM5/16/12
to rav...@googlegroups.com
That's quite nice. thank you.

monsters

unread,
May 17, 2012, 12:07:49 PM5/17/12
to rav...@googlegroups.com
The aggresive caching setting seems to have changed since this doc, does anyone have an example?

I can call it on the documentStore object, which returns an IDisposable object, not sure what i'm to do with that.. 

I could do this, but is it right?

using (var whatsThis = _documentStore.AggressivelyCacheFor(new TimeSpan(0,5,0)))
using (var session = _documentStore.OpenSession())
{
    //stuff
}

Matt Warren

unread,
May 17, 2012, 12:22:16 PM5/17/12
to rav...@googlegroups.com
You don't need to store the variable returned from the call, just make sure it's in the using statement so it gets disposed automaticially, like this:

using (_documentStore.AggressivelyCacheFor(new TimeSpan(0,5,0))) 
using (var session = _documentStore.OpenSession()) 
{
    //stuff


Reply all
Reply to author
Forward
0 new messages