Skip to content
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

Mark cache dirty on any update #45

Open
eniklas opened this issue Feb 24, 2021 · 0 comments
Open

Mark cache dirty on any update #45

eniklas opened this issue Feb 24, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@eniklas
Copy link
Owner

eniklas commented Feb 24, 2021

Currently, the cache is marked dirty when an API call is attempted, which is used to determine if the cache has been updated since we started up or last saved it, in which case it needs to be saved to disk again. The dirty status is a value in the cache data itself, which isn't great. A better way to do this might be to make the cache or the cache data a subclass of dict, with a dirty attribute that gets set to True on __setitem__ or __delitem__. Some attempts at this were made in #43 but I couldn't get it to work before my patience ran out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant