I had the idea on a call that there is a way we can make query_objects much faster by keeping parts of the cache that are still relevant. Below are some changes that would need to be made
- add
dateModified to the fields returned by the query function
- if a cache is found,
filter to keep all objects with a dateModified older than the datetime at runtime
query for objects only with a dateModified more recent than the datetime at runtime
- save the cache
- if no cache is found, then make sure the datetime you are querying against is very far in the past so that you get all of the objects
- remove the
cache_tolerance parameter
I had the idea on a call that there is a way we can make
query_objectsmuch faster by keeping parts of the cache that are still relevant. Below are some changes that would need to be madedateModifiedto the fields returned by thequeryfunctionfilterto keep all objects with adateModifiedolder than the datetime at runtimequeryfor objects only with adateModifiedmore recent than the datetime at runtimecache_toleranceparameter