Skip to content

Design: Context and cache behavior when run is called with different context #48

@ahogappa

Description

@ahogappa

What

Define the expected behavior when run is called multiple times with different context options.

Goal

Establish clear semantics for how context and caching interact:

  • When should cached results be reused?
  • When should a new context trigger re-execution?
  • How should empty context ({}) vs. no context (nil) be handled?

The behavior should be intuitive and predictable for users.

Approach

  • Analyze current behavior where new context is silently ignored if one exists
  • Design clear rules for when context changes should trigger cache invalidation
  • Consider distinguishing between "no context argument" (use cache), "empty context" (ambiguous), and "new context values" (re-execute)
  • Document the chosen behavior clearly

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions