Posts

Showing posts from October, 2015

Understanding Couchbase's Document Expiration

I just had to investigate Couchbase's T(ime)T(o)L(ive) feature a bit because I was asked how to react externally on document expirations via DCP . The TTL feature allows you to create documents by specifying when the document should be automatically deleted. Here two example use cases: Caching: The items in a cache should be only valid for a specific period of time. The TTL feature allows you to invalidate items in the cache automatically. Let's assume that you are caching some product details (as a retailer). Then the prices of some products might change daily (or even more often). It now would make sense to make sure that the product price gets automatically updated once a day. So if the item is expired in cache then it should be fetched again from the original source system. The newly fetched item then has the updated price information. Session management: Couchbase is often used as a session cache/store. A session is just realized as a key value pair whereby the k