-
Notifications
You must be signed in to change notification settings - Fork 5
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
[discussion] Persistent storage improvments (TTL, auto-flush etc.) #4
Comments
I have changed the storage objects to add support for TTL. |
ty |
also one stupid question - why flushing only manual? Just in my opinion 'by-default' persistent storage must have auto-save mode if script ended without exceptions. Your cool framework have alot things, that simplifing addon-developing but this one is... strange |
I attempted to change when I do the expiration check, but I noticed that there was too high of a chance of a race condition. Data could expire in between checking existence of data and processing it. I see you're point on the flushing. I have set it to flush whenever the object is closed. |
Thanks for mantaining this project! I dont know enouth about Kodi's plugin architecture, so maybe thing that i'll say now just stupid. How about creating separated process, that allow comunicating by socket (*UDS where possible, where not - local TCP) and implements simple locking mechanism on it. So when some script want to CHANGE, CHECK, LOAD or DUMP persistent storage, it send LOCK and after all done, UNLOCK. Becouse this separated process dont do anything heavy, only store LOCKING status per storage - i'm sure it bring minimal overhead (especially over *UDS where possible). And you will have simple and dereminated locking mechanism on all platforms without potential problems with IPC. |
Something like that already exists for Kodi. https://kodi.wiki/view/Add-on:Common_plugin_cache |
hmm intersting, missed this lib. |
No description provided.
The text was updated successfully, but these errors were encountered: