Skip to content

Commit 7221a43

Browse files
authored
Merge pull request #39 from shuangela/DOCSP-42363-new-caching-behavior
[DOCSP-42363] Add New Caching Behavoir
2 parents b5284fb + 9125f29 commit 7221a43

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
.DS_Store
22
giza.log
3-
source*
43
build/
54
.yardoc

source/release-notes/mongoid-8.0.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -824,3 +824,14 @@ Support for individually caching criteria objects has been dropped in Mongoid 8.
824824

825825
In order to get caching functionality, enable the Mongoid Query Cache. See the
826826
section on :ref:`Query Cache <query-cache>` for more details.
827+
828+
New Caching Behavior of ``<association>_ids`` Methods
829+
-----------------------------------------------------
830+
831+
If you call an ``<association>_ids`` method, such as ``member_ids``, on an
832+
association previously loaded into memory, Mongoid 8.0 uses the in-memory collection to satisfy the query
833+
instead of issuing a new query to the database.
834+
835+
To force an ``<association>_ids`` method to issue a new database query,
836+
you can either reset the association or reload the parent record.
837+

0 commit comments

Comments
 (0)