File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -150,7 +150,10 @@ function Model(opts) {
150
150
if ( data . length === 0 ) {
151
151
return cb ( new Error ( "Not found" ) ) ;
152
152
}
153
- Singleton . get ( opts . table + "/" + id , { cache : options . cache } , function ( cb ) {
153
+ Singleton . get ( opts . table + "/" + id , {
154
+ cache : options . cache ,
155
+ save_check : opts . settings . get ( "instance.cacheSaveCheck" )
156
+ } , function ( cb ) {
154
157
return createInstance ( data [ 0 ] , {
155
158
autoSave : opts . autoSave ,
156
159
autoFetch : ( options . autoFetchLimit === 0 ? false : opts . autoFetch ) ,
@@ -223,9 +226,10 @@ function Model(opts) {
223
226
merge : merge ,
224
227
offset : options . offset ,
225
228
newInstance : function ( data , cb ) {
226
- Singleton . get ( opts . table + ( merge ? "+" + merge . from . table : "" ) + "/" + data [ opts . id ] ,
227
- { cache : options . cache } ,
228
- function ( cb ) {
229
+ Singleton . get ( opts . table + ( merge ? "+" + merge . from . table : "" ) + "/" + data [ opts . id ] , {
230
+ cache : options . cache ,
231
+ save_check : opts . settings . get ( "instance.cacheSaveCheck" )
232
+ } , function ( cb ) {
229
233
return createInstance ( data , {
230
234
autoSave : opts . autoSave ,
231
235
autoFetch : ( options . autoFetchLimit === 0 ? false : opts . autoFetch ) ,
You can’t perform that action at this time.
0 commit comments