Hacker News new | ask | show | jobs
by itsalotoffun 307 days ago
When you discuss caching, are you talking about caching the LLM response on your side (what I presume) or actual prompt caching (using the provider cache[0])? Curious why you'd invalidate static content?

[0]: https://docs.anthropic.com/en/docs/build-with-claude/prompt-...

1 comments

I think I need to make this a bit more clear. I was mostly referring to caching the tools (sub-agents) if they are a pure function. But that may be a bit too speicific for the sake of this post.

i.e. you have a query that reads data that doesn't change often, so you can cache the result.

It seems very doubtful to me that every query would be literally the same (e.g. same hash), if these are plain text descriptions of the subset task.
The task can be something like summarize each source file. Many files might not change every time.
I mean that depends on how you define the "input" for the tool. Some can be very deterministic like an enum, boolean, number, etc.