Replies: 2 comments
-
|
Hey @allefeld thanks for the post! I think The example above, setting a TTL based on a file's "age", will cause the cache to be invalidated at some point in the future (e.g. if the file was last edited yesterday, you're effectively passing By contrast There is definitely some room for me to improve cache cleanup, including what's discussed in #27. If this is a motivating concern for you, or if there's a different class of cache leak you're observing, I should be able to take a swing at it before the end of the year. |
Beta Was this translation helpful? Give feedback.
-
|
Here's my use case: I have written a preprocessor (as a shell script) which turns binary files of some types into readable text. This preprocessor can be used e.g. with So my idea was to wrap the call to my preprocessor in Now it sounds like In the meantime I implemented my own simple cache mechanism within my shell script, and it seems to be working well. The cache file name is based on a hash of the original file path. It is used if it is newer than the original file and overwritten otherwise. So maybe there's no need to try and make |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I want to use
bktto cache preprocessor results, like the rolelessfile/lesspipeplays forless. Important here is that the cache is renewed when the file has changed.--modtimehelps in principle, but has the disadvantage that cache entries stick around even though they will never be used again (if I understand correctly how the option works). My workaround is to set--ttlto the file age.A simple proof of concept, caching
md5sum:I'd be interested to know whether this indeed works as intended, or can be improved.
Beta Was this translation helpful? Give feedback.
All reactions