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

Fixed #3047 #3049

Merged
merged 2 commits into from
Jul 17, 2023
Merged

Fixed #3047 #3049

merged 2 commits into from
Jul 17, 2023

Conversation

dszlachta
Copy link
Contributor

This PR adds a new option to cache Store: readOnly bool. Read-only cache will always read items, but never write them.
If Write is called, then a new error ErrReadOnly is returned. Cache errors are usually ignored, so it's OK. But it will show up when debugging with CACHE_VERBOSE=true.

Because the new cache is disabled by default, in order to test the changes one needs to add
cache := opts.Globals.CacheStore(!opts.Cache) to e.g. transactions/handle_show.go

@dszlachta dszlachta requested a review from tjayrush July 17, 2023 12:11
@tjayrush tjayrush merged commit fca14be into develop Jul 17, 2023
@tjayrush tjayrush deleted the bugfix/3047_always_read_from_cache branch July 17, 2023 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants