Reputation: 588
I'm working in .net 4.6, i need a solution for persisted cache.
Our organization cloud environment offers few services, among are mongo and couchbase.
I'm was wondering if anyone here can enlighten me about whether couchbase is the right choice.
My caching scenario is pretty simple, I'd like to cache json documents with a given key. I'd prefer to have an LRU caching behavior than TTL behavior.
Any insight would be appreciated.
Thanx, Gili
Upvotes: 2
Views: 276
Reputation: 26151
Couchbase is ideal for persistent caching use cases. It has a memory-first architecture (i.e. a built-in cache) and data is persisted to disk asynchronously. You can do exactly the thing you are asking for: store JSON data by key. I believe an LRU-like system is used by default. If you are storing more data than fits in RAM, I believe the oldest values will be evicted by default.
And I know you didn't ask for this, but TTL is optional in Couchbase if you ever want to explore that. Further, with Couchbase 5 you have a memory-only caching option called "ephemeral" buckets as well.
Upvotes: 1