Skip to content

Cache middleware: design discussion for similarity_threshold floor and max_entries bound #1888

@ColinM-sys

Description

@ColinM-sys

Opening this to track the design discussion for #1879 per @dagardner-nv's request.

  1. Should similarity_threshold enforce a minimum floor or just document the consequences of lower values? A lower threshold increases the risk of cache poisoning since crafted inputs can collide with legitimate cached keys, but a hard minimum may not be appropriate for a core library where operators know their own use case.

  2. Should max_entries be configurable through CacheMiddlewareConfig and passed through the registration layer, or left as a constructor-only concern?

Happy to revise the PR once the discussion settles on a direction.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions