Persisting cached data after removal/eviction
===

This question is specifically pertaining to Couchbase, but I guess it could apply to anything with the memcached api.

Lets, say I am creating a client/server chat application, and on my server, I am storing chat session information for each user in a Couchbase data bucket. Well after the chat session is over, I will remove the session object from the data bucket, but at the same time I also want to persist it to a permanent NoSQL datastore for reporting and analytics purposes. I also want session objects to be persisted upon cache eviction, when sessions timeout, etc.

Is there some sort of "best practice" (or even a function of Couchbase that I am missing) that enables me to do this efficiently and maintaining best possible performance of my in memory caching system?