Changeset 50029
- Timestamp:
- 01/27/2021 02:49:56 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/media/models/query.js
r50021 r50029 244 244 orderby = Query.orderby, 245 245 defaults = Query.defaultProps, 246 query; 246 query, 247 cache = !! props.cache || _.isUndefined( props.cache ); 247 248 248 249 // Remove the `query` property. This isn't linked to a query, 249 250 // this *is* the query. 250 251 delete props.query; 252 delete props.cache; 251 253 252 254 // Fill default args. … … 287 289 args.orderby = orderby.valuemap[ props.orderby ] || props.orderby; 288 290 289 queries = []; 291 // Search the query cache for a matching query. 292 if ( cache ) { 293 query = _.find( queries, function( query ) { 294 return _.isEqual( query.args, args ); 295 }); 296 } else { 297 queries = []; 298 } 290 299 291 300 // Otherwise, create a new query and add it to the cache.
Note: See TracChangeset
for help on using the changeset viewer.