Cache and reference with git backend

Hello,

Quick question regarding cache and evaluation call with reference.

I feel that cache gives in this case inconsistency: ask for an evaluation with reference, remove the reference from the call and you will still have the reference version. I guess reference is not part of the cache key ?

Many thanks for your explanations,

Regards,

Great question. You’re right, we haven’t built reference into the cache key. While we can and should fix this. The cache is actually very redundent with the declarative backends enabled. It was primarily built to remove the need for lookups on the backing relational databases. However, the declarative backends (the only ones which currently support reference (actually only git supports it rn, but we could add it to OCI too if that is desired)) perform everything on an in-memory snapshot of all state. So you can forgo cache and likely get even better performance there.

We can definitely make this clearer in the docs, I will make a note.

Hi George !
Many thanks for the clarification !

2 Likes