Skip to content

Documentation: Outdated v0.7 example causes TypeError #4

@tanbro

Description

@tanbro

Severity

High

Location

File: README.md
Lines: 210-213

Description

The example in the quick start section shows:

lru_cache = Cache("my-first-lru-cache", LruTPolicy, factory)

However, line 213 shows LruTPolicy as a class, not an instance. This contradicts the v0.7 breaking change documentation (lines 232-270) which states policies must be instantiated: LruTPolicy().

Impact

Users following the example will encounter:

TypeError: AbstractPolicy subclasses must be instantiated before passing to RedisFuncCache

This creates a poor first impression and immediate barrier to adoption.

Correct Example

# Policy must be instantiated (note the parentheses)
lru_cache = Cache("my-first-lru-cache", LruTPolicy(), factory)

Proposed Fix

Update line 213 and any other examples in README.md that show the old usage pattern.

Additional Context

  • Breaking change introduced in v0.7.0
  • CHANGELOG.md correctly documents the change
  • Only the quick start example needs updating

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions