-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Hi,
I was a bit saddened when I realized that bc::memoize would only keep the freshest invocation in memory:
foo() { … } && bc::memoize foo
foo 3 # Runs cold, normal.
foo 3 # Runs memoized, cool.
foo 4 # Runs cold, normal.
foo 4 # Runs memoized, cool.
foo 3 # Runs cold, sadly.
foo 4 # Runs cold, sadly.
It appears bc::cache supports the above usage pattern, but OTOH polluting the filesystem with files (and I/O) is not very appealing for my use case.
I'm curious, is there some fundamental reason that would make supporting the above usage pattern in bc::memoize a headache?
Thanks for your library, it really fills one of the many bash gaps — I can almost do away with function static variables thanks to you :)
Metadata
Metadata
Assignees
Labels
No labels