Skip to content

improve Scribble's make-log-based-eval? #25

@bennn

Description

@bennn

Frow WJB:

FWIW, I used this function to implement a caching version that has better
(more automagic) behavior than make-log-based-eval.
You can add it to with-cache if you think it's useful/a good place for it.

(define (make-cached-eval name . rest)
  (define ev
    (make-log-based-eval
     (cachefile name)
     (if (file-exists? (cachefile name))
         'replay
         'record)))
  (for ([r rest])
    (ev r))
  ev)

The function doesn't use with-cache, but might be a good package addition. William was looking for behavior like make-log-based-eval and came to with-cache, so at least a docs pointer could be useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions