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

Add flush to arbitrary file #12

Merged
merged 8 commits into from
Jul 23, 2024
Merged

Conversation

Ethanol48
Copy link
Contributor

@Ethanol48 Ethanol48 commented Jul 20, 2024

Motivation

In issue #6 was discussed of adding public functions to change state in the db, and because of this I think it makes sense to have a way to have a cache file without the need to set it in the db #11 , or in the case that we want to preserve the cache from the previous session without being altered.

Solution

Added in flush_to(cache_path) JsonBlockCacheDB implementation a function that lets you dump the db in a determined file.

@Ethanol48
Copy link
Contributor Author

Added minimal documentation.

@Ethanol48
Copy link
Contributor Author

Pending changing to CHANGELOG.md

@Ethanol48 Ethanol48 changed the title Add flush to arbitrary file Add flush to arbitrary file (draft) Jul 20, 2024
@Ethanol48 Ethanol48 closed this Jul 20, 2024
@Ethanol48 Ethanol48 reopened this Jul 20, 2024
@Ethanol48 Ethanol48 marked this pull request as draft July 20, 2024 13:52
@Ethanol48
Copy link
Contributor Author

I’m sorry for any notifications sent, I was using my phone and the application doesn’t have much support and made some mistakes, my apologies.

@Ethanol48 Ethanol48 marked this pull request as ready for review July 21, 2024 16:07
@Ethanol48 Ethanol48 changed the title Add flush to arbitrary file (draft) Add flush to arbitrary file Jul 21, 2024
src/backend.rs Outdated Show resolved Hide resolved
src/backend.rs Outdated Show resolved Hide resolved
src/cache.rs Outdated Show resolved Hide resolved
@Ethanol48
Copy link
Contributor Author

Done 👍🏼

src/backend.rs Outdated Show resolved Hide resolved
src/cache.rs Outdated Show resolved Hide resolved
@DaniPopes DaniPopes requested a review from mattsse July 22, 2024 16:04
@Ethanol48 Ethanol48 requested a review from DaniPopes July 23, 2024 14:17
Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@mattsse mattsse merged commit f3c7f43 into foundry-rs:main Jul 23, 2024
16 checks passed
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.

3 participants