Skip to content

Commit e3173c4

Browse files
author
Bob Grabar
committed
DOCS-580 cache FAQ
1 parent 5d13a60 commit e3173c4

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

source/faq/fundamentals.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,23 @@ in RAM, MongoDB serves all queries from memory.
135135
MongoDB does not implement a query cache: MongoDB serves all queries
136136
directly from the indexes and/or data files.
137137

138+
Does MongoDB require a separate object-caching layer?
139+
-----------------------------------------------------
140+
141+
No. MongoDB integrates databases with object caches such that an
142+
object's representation in the database is very close to its
143+
representation in memory. Retrieval from RAM is a far less expensive
144+
operation for MongoDB than it is for a traditional RDMS. For an RDMS, a
145+
high expense is incurred when data must be transformed into an object
146+
representation when transferred to RAM.
147+
148+
Additionally, MongoDB's integration of databases with memory means there
149+
is no risk of retrieving stale data from the cache.
150+
151+
Keep in mind, though, that in MongoDB retrieving from RAM is always
152+
faster than from disk, and it is best to have enough memory to fit all
153+
of your working data set.
154+
138155
What language is MongoDB written in?
139156
------------------------------------
140157

0 commit comments

Comments
 (0)