https://pantsbuild.org/ logo
#development
Title
# development
c

curved-television-6568

01/12/2022, 8:29 AM
The rule memoization in the engine, how are the characteristics for long running processes? 🧵
Are the rule results ever evicted, for instance?
I’m considering my
underpants
poc, and if used in a long running application, the rule inputs may very well differ frequently, and as such the memoization isn’t really buying us much in that case.
I guess going with the
_uncacheable
decorator, the memoization seems to be dropped between sessions, so that’s good enough perhaps, iiuc.
w

witty-crayon-22786

01/12/2022, 4:54 PM
if you mark a process
ProcessCacheScope.PER_SESSION
, you don’t need the decorator
c

curved-television-6568

01/12/2022, 4:59 PM
not all rules are processes..
👍 1
w

witty-crayon-22786

01/12/2022, 5:00 PM
got it. types can also be marked
cacheable = False
via the
EngineAwareReturnType
class
c

curved-television-6568

01/12/2022, 5:00 PM
Ah, right, I think maybe I may have mislead you with “long running processes” above.. think of that process as the “pantsd” process
w

witty-crayon-22786

01/12/2022, 5:00 PM
yep
c

curved-television-6568

01/12/2022, 5:01 PM
Oh, cool, will look into the EART thing..
so, is there any sort of limit or gc running for the memoized data?
w

witty-crayon-22786

01/12/2022, 5:07 PM
c

curved-television-6568

01/12/2022, 5:15 PM
Ah, ok. Thanks for the issue, will monitor that 🙂