smartfilter's Issues
In case of altering filter condition, both results, i.e. for original filter condition and for altered filter condition, should get cached
- Lets say we added a filter Qtr in [ "Q1", "Q2" ], first time it will fire a query and store result in memory
- Now apply filter condition Qtr in [ "Q1", "Q2", "Q3" ], now it will compare it with last condition and fire query only for only "Q3" and merge new result with previous result.
Now in this case both results, i.e. new results for only Q3 and merged result for Q1, Q2 and Q3 should be cached. Right now only new result is getting cached.
Checking existing result in memory should also be done before altering query
- Lets say we added a filter Qtr in [ "Q1", "Q2" ], first time it will fire a query and store result in memory
- Now apply filter condition Qtr in [ "Q1", "Q2", "Q3" ], now it will compare it with last condition and fire query only for only "Q3" and merge new result with previous result.
- Now apply filter condition Qtr in [ "Q1", "Q2" ], Here it starts comparing this condition with last condition and takes appropriate action. Instead first it should try to find result from existing results.
Caching result does not consider order of values
When you add filter condition Qtr in [ "Q1" , "Q2" ], it will make query to database and cache result with this filter condition.
Now next time when you say Qtr in [ "Q2" , "Q1" ], because of change in sequence, it doesn't understand that filter condition is matching with older one.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.