Yes and No. Couchbase Server, often simply referred to as Couchbase, is a NoSQL database that does use in-memory storage for active data to provide fast read and write operations, but it's not purely an in-memory database like Redis. This means that while data is held in memory for performance reasons, it is also persisted on disk for durability, making Couchbase a distributed, multi-model NoSQL document-oriented database.
In fact, Couchbase utilizes both in-memory and on-disk technology. It uses a managed cache to hold the most frequently used or recently used data in RAM. It also maintains a full copy of all the data on disk to ensure that even in the event of power failure, no data is lost. This combination of in-memory speed with on-disk data persistence is what differentiates Couchbase from pure in-memory databases.
Here's a simple example of how you might interact with Couchbase in Java:
Please note that depending on the specific requirements of your applications, especially in terms of durability vs performance, Couchbase might be more suitable than purely in-memory databases, or vice versa.