examples: Use cachier as cache #181
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi!
I am currently working on migrating my accounting to Beancount and am encountering a few things that I think could be improved here and there.
One such thing is the caching provided by beangulp. My usecase is to convert PDFs, but also run them through an LLM to stamp out some interesting information, the lather can take quite a bit of time.
Initially, I started out with beangulp.cache, but at some point had to make a round-trip to the source code to find out something that was clear to me. Then I found out that beangulp.cache is actually deprecated and beangulp.simple_cache succeeded it. But simple_cache was not as ergonomic to use as the first and also not released yet, so I decided on using cachier instead.
That left me wondering whether caching should be provided by beangulp at all. Not including a cache implementation leaves room to focus on the core domain of interfacing with Beancount.
This MR proposes to use cachier in the included example. A followup step would be deprecating all caching interfaces.
Let me know what you think of this :)