mirror of
https://github.com/apple/pkl.git
synced 2026-01-13 15:13:38 +01:00
Unexpected caching with pkl-go and Evaluator.EvaluateOutputText #165
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kallekoo on GitHub (May 17, 2024).
Hello!
Using pkl-go v0.6.0, when creating an evaluator like so
and evaluating a FileSource like so
where the underlying data for the path
pchanges between evaluations, the evaluator output remains unchanged.The workaround is to recreate the evaluator at appropriate intervals, but that leads to an overhead when the evaluator is being set up.
@holzensp commented on GitHub (May 17, 2024):
This is expected behaviour. A single evaluator instance caches aggressively. This is how Pkl manages to be deterministic, which is a core design goal.
Not caching leads to overhead everywhere else.