-
Notifications
You must be signed in to change notification settings - Fork 77
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
Enhance @memo with configurability and effects of @benmanes/caffeine #1553
Comments
It also thinkable to compile the configuration DSL directly to Java code and only support this for the compile Rascal code. |
Yes that one! but extended with everything (or almost everything) that caffeine can do, plus the file timestamp things.
Plus I'd like to see an interface for debugging/optimizing the choice of these features using some kind of statistical reports. |
And agreed, maybe @PaulKlint can already take a lot of benefit from what is in https://github.com/usethesource/rascal/blob/master/src/org/rascalmpl/library/util/Memo.rsc now for the compiler. |
asynchronous pre-loading would be impossible for the interpreter to do. |
Okay, that's quite a big feature set, and requires more design of the
Some of the features you mentioned are easy to implement. But just to be clear, we are not using Caffeine in this case, the memo tag has some specific features that don't map to Caffeine. |
ok yes; understood. I'm expecting an "extended subset" of the Caffeine features and I'm not sure where the boundaries are. In particular the asynchronous backroom serialization to disk; I'm not sure how much of Caffeine we could reuse for that, because of course it has to be integrated with our Asynchrounous pre-loading is probably based on a lambda or an interface which we can implement and link to a compiler or interpreted Rascal function. However, for interpretation I foresee lots of issues :-) of course. timestamps for |
Is your feature request related to a problem? Please describe.
@memo
allows caching side-effects to otherwise pure Rascal functions. It helps to keep the code clean whilst also providing a mode of efficiency normally associated with procedural and object-oriented programming.Describe the solution you'd like
@memo
tag with a mini abstract configuration DSL that can be used to build caffeine caches with different properties.loc
parameters; i.e. that caches are cleared when timestamps of files are older than the timestamp stored in the cacheDescribe alternatives you've considered
Impact
The text was updated successfully, but these errors were encountered: