@@ -135,22 +135,20 @@ in RAM, MongoDB serves all queries from memory.
135
135
MongoDB does not implement a query cache: MongoDB serves all queries
136
136
directly from the indexes and/or data files.
137
137
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.
138
+ Does MongoDB require a separate caching layer for application-level caching?
139
+ ----------------------------------------------------------------------------
140
+
141
+ No. In MongoDB, a document's representation in the database is similar
142
+ to its representation in application memory. This means the database
143
+ already stores the usable form of data, making the data usable in both
144
+ the persistent store and in the application cache. This eliminates the
145
+ need for a separate caching layer in the application.
146
+
147
+ This differs from relational databases, where caching data is more
148
+ expensive. Relational databases must transform data into object
149
+ representations that applications can read and must store the
150
+ transformed data in a separate cache. If joins are required that adds to
151
+ the overhead.
154
152
155
153
What language is MongoDB written in?
156
154
------------------------------------
0 commit comments