-
Notifications
You must be signed in to change notification settings - Fork 138
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
Readonly cache.db #113
Comments
I don't think that's currently possible but it seems like a good thing to guarantee. I think it's probably the settings that are being updated to their existing values. During Cache initialization, you'll see INSERT OR REPLACE INTO Settings. I'm not sure what other statements make modifications. Can you explain the use case? Is it a general concern or does it block something else? |
Here is the error if I make the file readonly Traceback (most recent call last): |
So my use case: my app connects to live data sources, so I use disk cache for 2 purposes:
What happens is that after a succesful test run I always see the .db file modified which causes unwated confusion in git gui. Has the db changed due to an application but, or is it just noise. I can see a couple of avenues
Andrea |
Are you including the cache in your git repository? I think adding it to .gitignore would be better. |
Yes, as long as I know I have not really changed it. |
Is this feature of any interest at all? |
Yes, it’s interesting. I tried to code a solution but got stuck (for a reason I can’t recall now). I think the issue was around pragmas that are set in the initializer. The cache initializer code has historically been a bug farm so changes are risky. It’s not a feature that I need per se so I stopped thinking about it. As I think about it this morning, maybe there’s fast-pass logic that could be added to the initializer as a workaround. You could try inheriting and overriding that method for experimentation. |
Here is a simple example. |
See the query-only-support branch for work-in-progress. |
I saw it.
|
Search the tutorial for “tag index”. It’s described there and in the api. All the metadata settings are liable to get out of sync. This is also the first setting that is incompatible with others: e.g. query only and some eviction policies. The branch also needs tests. |
I am also interested in this feature. We have a snapshot of the Is this being worked on? |
Not actively, no. I believe the branch referenced above still exists though. |
This was exactly my case when I submitted it. Now we wrap At the time, there was little or no interest in this feature so, as you can see, nothing happened. |
Hi
is it possible to enforce a readonly cache.db database?
I am running with default options and although it is not supposed to modify the db, at the end the db file is different (and I am only reading from the cache).
Regards
The text was updated successfully, but these errors were encountered: