-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix #6866 client side cache when running with web sockets #7182
Conversation
- also removed removed unneeded stripHashKey feature from deepEquals()
@@ -1556,14 +1544,155 @@ SIREPO.app.service('validationService', function(utilities) { | |||
|
|||
}); | |||
|
|||
SIREPO.app.factory('srCache', function(appState, $rootScope) { | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@e-carlin and @robnagler srCache is the client side cache for web sockets, using indexedDB
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the naming needs to be more consistent.
} | ||
}; | ||
c.onerror = () => { | ||
invokeCallback(callback, null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want to log the error even for debugging purposes? Do we want an errorCallback?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we want to log every getFrame() call if it fails. Possibly the first failure. The caller can't really do any additional handling other than treating it as a cache-miss.
}; | ||
} | ||
|
||
self.clearFrames = (simId, modelName) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having frames and generic "object" seems odd to me. This is srFrameCache or something like that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a couple comments but overall looks good and worked well.
- change objectStore() to getObjectStore() and add doc
Also includes some improvements for appState.deepCopy() and openmc save calls.