-
Notifications
You must be signed in to change notification settings - Fork 20
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
Mutable caches #169
Labels
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Caches are used in oskari-server to improve performance but the cached objects are mutable. This introduces a problem where calling setters on cached objects like OskariLayer.setUrl() modifies the cached object which makes the cached objects go out-of-sync with the database. This might result in difficult to debug situations where some functionality might break after maybe even another user has used a totally unrelated functionality that has modified cached objects.
For example in oskariorg/oskari-server@972c50e the url and layer name is modified on OskariLayer and any future calls to OskariLayerService.find(layerId) will receive the modified OskariLayer from cache until the cache has been flushed and the cached data is repopulated from the database.
The text was updated successfully, but these errors were encountered: